Elastic Cloud API
1

Base URL
https://api.elastic-cloud.com/api/v1

This RESTful API enables you to perform most of the operations available in the UI console through API calls.

You can create an API key to quickly and easily authenticate, then use the API to create and manage deployments, configure remote clusters, set up traffic filters, manage extensions, and much more. Access the API from its base URL at api.elastic-cloud.com.

To manage your serverless projects, use the Elastic Cloud Serverless API.

Documentation source and versions

This documentation is derived from https://api.elastic-cloud.com/api/v1/api-docs-user/swagger.json. It is provided under license Attribution-NonCommercial-NoDerivatives 4.0 International.

This is version 1 of this API documentation. Last update on Mar 24, 2025.

Principles

The Elasticsearch Service API is built on REST. This means that:

  • URLs are based on resource IDs.
  • JSON is the data interchange format.
  • Standard HTTP response codes and verbs are used.

RESTful API calls are stateless. Every request that you make happens in isolation from other calls and must include all the information necessary for Elasticsearch Service to fulfill the request. API requests return JSON output, which is a format that is machine-readable and works well for automation.

Calls to API endpoints require different request methods, depending on what they do. You use these four request methods to communicate with the Elasticsearch Service RESTful API:

  • To fetch a resource: GET
  • To create a new resource: POST
  • To update an existing resource: PUT or PATCH
  • To delete a resource: DELETE

Rate limiting

API calls are rate limited in a timing window. The current remaining available calls quota is available through the following header fields, included in each API call response:

  • x-ratelimit-interval - The time duration for the quota calculation.
  • x-ratelimit-remaining - The remaining number of API calls available.
  • x-ratelimit-limit - The total number of calls available in the duration x-ratelimit-interval.

Authentication

Elastic Cloud APIs support key-based authentication. You must create an API key and use the encoded value in the request header.
For convenience, you can export your API key into your shell environment:

export EC_API_KEY="YOUR_GENERATED_API_KEY"

For example, the following curl command retrieves a list of your deployments:

curl -H "Authorization: ApiKey $EC_API_KEY" https://api.elastic-cloud.com/api/v1/deployments

Accounts

Retrieve and update the current Elasticsearch Service account.

Fetch current account information

GET /account

Fetch current account information.

Responses

  • 200 application/json

    Account fetched successfully

    Hide response attributes Show response attributes object
    • id string Required

      The account's identifier

    • trust object

      Settings related to the level of trust of the clusters in this account

      Hide trust attribute Show trust attribute object
      • trust_all boolean Required

        If true, all clusters in this account will by default trust all other clusters in the same account

  • 404 application/json

    Account not found. (code: accounts.not_found)

    Hide headers attribute Show headers attribute
    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

GET /account
curl \
 --request GET 'https://api.elastic-cloud.com/api/v1/account'
Response examples (200)
{
  "id": "string",
  "trust": {
    "trust_all": true
  }
}
Response examples (404)
# Headers
x-cloud-error-codes: accounts.not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}