Elasticsearch API
  1. Authentication
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
    • List Extensions
    • Uploads the Extension
    • Update Extension
    • Delete Extension
    • Get Extension
  • Stack
    • Get stack versions
  1. Authentication

Create API key

开发环境
http://127.0.0.1
开发环境
http://127.0.0.1
POST
/users/auth/keys
Authentication
Creates a new API key.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1/users/auth/keys' \
--header 'Authorization: ApiKey {{EC_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "description": "string",
    "authentication_token": "string"
}'
响应示例响应示例
201 - 示例 1
{
    "creation_date": "2019-08-24T14:15:22Z",
    "user_id": "string",
    "id": "string",
    "key": "string",
    "description": "string"
}

请求参数

Header 参数
Authorization
string 
可选
默认值:
ApiKey {{EC_API_KEY}}
Body 参数application/json
The request payload that creates the API keys.
description
string 
必需
API key description. Useful if there are multiple keys
authentication_token
string 
可选
Deprecated. The security token from reauthenticate API
示例

返回响应

🟢201The API key is created and returned in the body of the response.
application/json
Body
The response model for an API key.
creation_date
string <date-time>
必需
The date/time for when the API key is created.
user_id
string 
可选
The user ID.
id
string 
必需
The API key ID.
key
string 
可选
The API key. TIP: Since the API key is returned only once, save it in a safe place.
description
string 
必需
The API key description. TIP: Useful when you have multiple API keys.
🟠400The request is invalid. Specify a different request, then try again. (code: `api_keys.invalid_input`)
🟠449Elevated permissions are required. (code: `root.unauthorized.rbac.elevated_permissions_required`)
上一页
Get API key
下一页
Delete API keys
Built with