Create an extension
开发环境
http://127.0.0.1
开发环境
http://127.0.0.1
POST
/deployments/extensions
Extensions
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.请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1/deployments/extensions' \
--header 'Authorization: ApiKey {{EC_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"version": "string",
"extension_type": "plugin",
"name": "string",
"download_url": "string",
"description": "string"
}'
响应示例响应示例
201 - 示例 1
{
"description": "string",
"url": "string",
"extension_type": "plugin",
"download_url": "string",
"deployments": [
"string"
],
"version": "string",
"file_metadata": {
"url": "http://example.com",
"last_modified_date": "2019-08-24T14:15:22Z",
"size": 0
},
"id": "string",
"name": "string"
}
请求参数
Header 参数
Authorization
string
可选
默认值:
ApiKey {{EC_API_KEY}}
Body 参数application/json