Elasticsearch API
  1. Extensions
Elasticsearch API
  • Accounts
    • Updates the current account
      PUT
    • Updates the current account
      PATCH
    • Fetch current account information
      GET
  • Authentication
    • Delete API key
      DELETE
    • Get API key
      GET
    • Create API key
      POST
    • Delete API keys
      DELETE
    • Get all API keys
      GET
  • BillingCostsAnalysis
    • Get costs overview for the organization
      GET
    • Get deployments costs for the organization
      GET
    • Get itemized costs for the organization
      GET
    • Get itemized costs by deployments
      GET
  • DeploymentTemplates
    • Get deployment templates
      GET
    • Get deployment template
      GET
  • Deployments
    • Shutdown Deployment Elasticsearch Resource
      POST
    • Start all instances
      POST
    • Restores a shutdown resource
      POST
    • Restores a shutdown Deployment
      POST
    • Set remote clusters
      PUT
    • Get remote clusters
      GET
    • Stop instances
      POST
    • Reset the secret token for an APM resource.
      POST
    • Get Deployment Enterprise Search Resource Info
      GET
    • Get Deployment Kibana Resource Info
      GET
    • Set AppSearch read-only status
      PUT
    • Set AppSearch read-only status
      GET
    • Start instances
      POST
    • Restart Deployment Stateless Resource
      POST
    • Shuts down Deployment
      POST
    • Migrate Elasticsearch resource to use SLM
      POST
    • Start maintenance mode
      POST
    • Restart Deployment Elasticsearch Resource
      POST
    • Start maintenance mode (all instances)
      POST
    • Reset 'elastic' user password
      POST
    • Stop all instances
      POST
    • Migrate Elasticsearch and associated Kibana resources to enable CCR
      POST
    • Add or remove settings from the Elasticsearch resource keystore
      PATCH
    • Get the settings from the Elasticsearch resource keystore
      GET
    • Search Deployments
      POST
    • Get eligible remote clusters
      POST
    • Update Deployment
      PUT
    • Get Deployment
      GET
    • Get Deployment Elasticsearch Resource Info
      GET
    • Stop maintenance mode (all instances)
      POST
    • Migrate Elasticsearch resource to use ILM
      POST
    • Shutdown Deployment Stateless Resource
      POST
    • Get Deployment APM Resource Info
      GET
    • Stop maintenance mode
      POST
    • Cancel resource pending plan
      DELETE
    • Get Deployment App Search Resource Info
      GET
    • Get eligible remote clusters
      POST
    • Create Deployment
      POST
    • List Deployments
      GET
    • Upgrade Kibana, APM, AppSearch inside Deployment
      POST
  • DeploymentsTrafficFilter
    • Delete ruleset association
    • Create ruleset association
    • Get associated deployments
    • Create a ruleset
    • List traffic filter rulesets
    • Get associated rulesets
    • Updates a ruleset
    • Delete a ruleset
    • Retrieves the ruleset by ID.
  • Extensions
    • Create an extension
      POST
    • List Extensions
      GET
    • Uploads the Extension
      PUT
    • Update Extension
      POST
    • Delete Extension
      DELETE
    • Get Extension
      GET
  • Stack
    • Get stack versions
  1. Extensions

Create an extension

开发环境
http://127.0.0.1
开发环境
http://127.0.0.1
POST
/deployments/extensions
Extensions
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.
请求示例请求示例
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
The body of a request to create a new extension
version
string 
必需
The Elasticsearch version.
extension_type
enum<string> 
必需
The extension type.
枚举值:
pluginbundle
name
string 
必需
The extension name. Only ASCII alphanumeric and [_.-] characters allowed
download_url
string 
可选
The URL to download the extension archive.
description
string 
可选
The extension description.
示例

返回响应

🟢201The extension that was just created.
application/json
Body
An API extension. It represents clusters' plugins and bundles
description
string 
可选
The extension description.
url
string 
必需
The extension URL to be used in the plan.
extension_type
enum<string> 
必需
The extension type.
枚举值:
pluginbundle
download_url
string 
可选
The download URL specified during extension creation.
deployments
array[string]
可选
List of deployments using this extension. Up to only 10000 deployments will be included in the list.
version
string 
必需
The Elasticsearch version.
file_metadata
object (ExtensionFileMetadata) 
可选
url
string <uri>
可选
The temporary URL to download the extension file. Usable for verification.
last_modified_date
string <date-time>
可选
The date and time the extension was last modified.
size
integer <int64>
可选
The extension file size in bytes.
id
string 
必需
The extension ID
name
string 
必需
The extension name.
🟠400Could not download the extension from the specified URL. (code: `extensions.request_execution_failed`)
🟠404Your current session does not have a user id associated with it. (code: `extensions.no_user_id`)
🟠409An extension already exists with the generated id. Please try again. (code: `extensions.id_already_exists`)
上一页
Retrieves the ruleset by ID.
下一页
List Extensions
Built with