Create an extension
Creates the extension.
The extensions API supports two types of usage patterns.
A). Specify a download_url
, http or https URL, where the extension is currently hosted. This will result in extension being copied to elastic repository.
B). Create only the extension metadata using the POST
endpoint and then use PUT
to upload the extension file. Leave the download_url
unspecified in this case.
Body
Required
the data that creates the extension
-
name
string Required The extension name. Only ASCII alphanumeric and [_.-] characters allowed
-
description
string The extension description.
-
download_url
string The URL to download the extension archive.
-
extension_type
string Required The extension type.
Values are
plugin
orbundle
. -
version
string Required The Elasticsearch version.
Responses
-
The extension that was just created.
-
Could not download the extension from the specified URL. (code:
extensions.request_execution_failed
) -
Your current session does not have a user id associated with it. (code:
extensions.no_user_id
) -
An extension already exists with the generated id. Please try again. (code:
extensions.id_already_exists
)
curl \
--request POST https://{{hostname}}/api/v1/deployments/extensions \
--data '{"name":"string","description":"string","download_url":"string","extension_type":"plugin","version":"string"}'
{
"name": "string",
"description": "string",
"download_url": "string",
"extension_type": "plugin",
"version": "string"
}
# Headers
x-cloud-resource-version: string
x-cloud-resource-created: string
x-cloud-resource-last-modified: string
# Payload
{
"id": "string",
"name": "string",
"description": "string",
"url": "string",
"download_url": "string",
"extension_type": "plugin",
"version": "string",
"deployments": [
"string"
],
"file_metadata": {
"last_modified_date": "2025-05-04T09:42:00Z",
"size": 42,
"url": "https://example.com"
}
}
# Headers
x-cloud-error-codes: extensions.request_execution_failed
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
# Headers
x-cloud-error-codes: extensions.no_user_id
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
# Headers
x-cloud-error-codes: extensions.id_already_exists
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}