Elastic Cloud Enterprise API
1

Base URL
https://{{hostname}}/api/v1

This RESTful API enables you to create and manage both your Elastic Stack deployments and the ECE platform.

NOTE: This documentation applies to the Elastic Cloud Enterprise API only. If you are using Elasticsearch Service, use the Elastic Cloud API.

This API supports both key-based and token-based authentication. Key-based is generally the preferred method. For details about creating an API key or bearer token, refer to Authentication.

Documentation source and versions

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

This is version 1 of this API documentation. Last update on Oct 29, 2024.

Authentication

The API accepts 2 different authentication methods:

Basic auth (http)

Basic auth tokens are constructed with the Basic keyword, followed by a space, followed by a base64-encoded string of your username:password (separated by a : colon).

Example: send a Authorization: Basic aGVsbG86aGVsbG8= HTTP header with your requests to authenticate with the API.

Api key (http_api_key)

Send an authentication token in the Authorization header to authenticate with the API.

Accounts

Retrieve and update the current Elasticsearch Service account.

Fetch current account information

GET /account

Fetch current account information.

Responses

  • 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

      Additional properties are allowed.

      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

  • 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 \
 -X GET https://{{hostname}}/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"
      ]
    }
  ]
}

Updates the current account

PUT /account

Updates the current account.

Body Required

the current account

  • trust object

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

    Additional properties are allowed.

    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

Responses

  • Account updated 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

      Additional properties are allowed.

      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

  • 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

PUT /account
curl \
 -X PUT https://{{hostname}}/api/v1/account \
 -d '{"trust":{"trust_all":true}}'
Request examples
{
  "trust": {
    "trust_all": true
  }
}
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"
      ]
    }
  ]
}

Updates the current account

PATCH /account

Updates the current account.

Body Required

All changes in the specified object are applied to the current account according to the JSON Merge Patch processing rules. Omitting existing fields causes the same values to be reapplied. Specifying a null value reverts the field to the default value, or removes the field when no default value exists.

string string

Responses

  • Account updated 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

      Additional properties are allowed.

      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

  • 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

PATCH /account
curl \
 -X PATCH https://{{hostname}}/api/v1/account \
 -d '"string"'
Request examples
string
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"
      ]
    }
  ]
}

Authentication

Manage your Elasticsearch Service API keys.

User authentication information

GET /users/auth

Provides authentication information about a user, including elevated permission status and TOTP device availability.

Responses

  • User authentication information response

    Hide response attributes Show response attributes object
GET /users/auth
curl \
 -X GET https://{{hostname}}/api/v1/users/auth
Response examples (200)
{
  "has_totp_device": true,
  "totp_device_source": "string",
  "has_elevated_permissions": true,
  "elevated_permissions_expire_at": "2025-05-04T09:42:00+00:00",
  "totp_device_source_enable_mfa_href": "string",
  "refresh_token_url": "string",
  "expires_at": "2025-05-04T09:42:00+00:00"
}

Login to ECE

POST /users/auth/_login

Authenticates against available users.

Body Required

The login request

  • username string Required

    The username part of the login request

  • password string Required

    The plain text password part of the login request

  • Configure how the API responds after a successful login.

    Additional properties are allowed.

    Hide login_state attribute Show login_state attribute object
    • path string

      The path to which to redirect post login - if not specified then no redirect is performed, instead 200 is returned with the token in the body

Responses

  • Login successful, returns the token in the body (if 'login_state.path' not specified)

    Hide response attributes Show response attributes object
    • token string Required

      The authorization bearer token that you use in subsequent requests

    • session_expiration_time string(date-time) Required

      The time that the session token will expire

  • Redirects to '/sso/token#BEARER_TOKEN?state=LOGIN_STATE' with the fragment containing a bearer token (if 'login_state.path' is specified)

    Additional properties are allowed.

  • The supplied authentication is invalid. (code: root.unauthenticated)

    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

  • The administrator needs to configure the authentication cluster. (code: authc.no_authentication_cluster)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.no_authentication_cluster.

    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

  • The authentication cluster failed to process the request. The response body contains details about the error. (code: authc.authentication_cluster_error)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.authentication_cluster_error.

    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

POST /users/auth/_login
curl \
 -X POST https://{{hostname}}/api/v1/users/auth/_login \
 -d '{"username":"string","password":"string","login_state":{"path":"string"}}'
Request examples
{
  "username": "string",
  "password": "string",
  "login_state": {
    "path": "string"
  }
}
Response examples (200)
{
  "token": "string",
  "session_expiration_time": "2025-05-04T09:42:00+00:00"
}
Response examples (302)
{}
Response examples (401)
# Headers
x-cloud-error-codes: root.unauthenticated

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (501)
# Headers
x-cloud-error-codes: authc.no_authentication_cluster

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (502)
# Headers
x-cloud-error-codes: authc.authentication_cluster_error

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

Logout from ECE

POST /users/auth/_logout

Destroys the current session.

Responses

  • The current session was successfully destroyed.

    Additional properties are allowed.

  • The administrator needs to configure the authentication cluster. (code: authc.no_authentication_cluster)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.no_authentication_cluster.

    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

  • The authentication cluster failed to process the request. The response body contains details about the error. (code: authc.authentication_cluster_error)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.authentication_cluster_error.

    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

POST /users/auth/_logout
curl \
 -X POST https://{{hostname}}/api/v1/users/auth/_logout
Response examples (200)
{}
Response examples (501)
# Headers
x-cloud-error-codes: authc.no_authentication_cluster

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (502)
# Headers
x-cloud-error-codes: authc.authentication_cluster_error

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

Refresh authentication token

POST /users/auth/_refresh

Issues a new authentication token.

Responses

  • The token refreshed successfully and was returned in the body of the response.

    Hide response attributes Show response attributes object
    • token string Required

      The authorization bearer token that you use in subsequent requests

    • session_expiration_time string(date-time) Required

      The time that the session token will expire

  • The authentication token is invalid or expired. (code: root.unauthorized)

    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

  • The administrator needs to configure the authentication cluster. (code: authc.no_authentication_cluster)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.no_authentication_cluster.

    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

  • The authentication cluster failed to process the request. The response body contains details about the error. (code: authc.authentication_cluster_error)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.authentication_cluster_error.

    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

POST /users/auth/_refresh
curl \
 -X POST https://{{hostname}}/api/v1/users/auth/_refresh
Response examples (200)
{
  "token": "string",
  "session_expiration_time": "2025-05-04T09:42:00+00:00"
}
Response examples (401)
# Headers
x-cloud-error-codes: root.unauthorized

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (501)
# Headers
x-cloud-error-codes: authc.no_authentication_cluster

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (502)
# Headers
x-cloud-error-codes: authc.authentication_cluster_error

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

Get all API keys

GET /users/auth/keys

Retrieves the metadata for all of the API keys that the user generated.

Responses

  • The metadata for the API keys is retrieved.

    Hide response attribute Show response attribute object
    • keys array[object] Required

      The list of API keys.

      Hide keys attributes Show keys attributes object
      • id string Required

        The API key ID.

      • user_id string

        The user ID.

      • The organization ID linked to the API key

      • description string Required

        The API key description. TIP: Useful when you have multiple API keys.

      • key string

        The API key. TIP: Since the API key is returned only once, save it in a safe place.

      • creation_date string(date-time) Required

        The date/time for when the API key is created.

      • expiration_date string(date-time)

        The date/time when the API key expires.

GET /users/auth/keys
curl \
 -X GET https://{{hostname}}/api/v1/users/auth/keys
Response examples (200)
{
  "keys": [
    {
      "id": "string",
      "user_id": "string",
      "organization_id": "string",
      "description": "string",
      "key": "string",
      "creation_date": "2025-05-04T09:42:00+00:00",
      "expiration_date": "2025-05-04T09:42:00+00:00"
    }
  ]
}

Create API key

POST /users/auth/keys

Creates a new API key.

Body Required

The request to create the API key

  • description string Required

    API key description. Useful if there are multiple keys

  • The optional expiration for the API key, provided as a duration (ex: '1d', '3h')

Responses

  • The API key is created and returned in the body of the response.

    Hide response attributes Show response attributes object
    • id string Required

      The API key ID.

    • user_id string

      The user ID.

    • The organization ID linked to the API key

    • description string Required

      The API key description. TIP: Useful when you have multiple API keys.

    • key string

      The API key. TIP: Since the API key is returned only once, save it in a safe place.

    • creation_date string(date-time) Required

      The date/time for when the API key is created.

    • expiration_date string(date-time)

      The date/time when the API key expires.

  • The request is invalid. Specify a different request, then try again. (code: api_keys.invalid_input)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is api_keys.invalid_input.

    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

POST /users/auth/keys
curl \
 -X POST https://{{hostname}}/api/v1/users/auth/keys \
 -d '{"description":"string","expiration":"string"}'
Request examples
{
  "description": "string",
  "expiration": "string"
}
Response examples (201)
{
  "id": "string",
  "user_id": "string",
  "organization_id": "string",
  "description": "string",
  "key": "string",
  "creation_date": "2025-05-04T09:42:00+00:00",
  "expiration_date": "2025-05-04T09:42:00+00:00"
}
Response examples (400)
# Headers
x-cloud-error-codes: api_keys.invalid_input

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

Delete API keys

DELETE /users/auth/keys

Delete or invalidate API keys.

Body Required

The request to delete API keys

  • keys array[string] Required

    The list of API key IDs.

Responses

  • The API keys are deleted.

    Additional properties are allowed.

DELETE /users/auth/keys
curl \
 -X DELETE https://{{hostname}}/api/v1/users/auth/keys \
 -d '{"keys":["string"]}'
Request examples
{
  "keys": [
    "string"
  ]
}
Response examples (200)
{}

Get all API keys for all users

GET /users/auth/keys/_all

Retrieves the metadata for all of the API keys for all users.

Responses

  • The metadata for the API keys is retrieved.

    Hide response attribute Show response attribute object
    • keys array[object] Required

      The list of API keys.

      Hide keys attributes Show keys attributes object
      • id string Required

        The API key ID.

      • user_id string

        The user ID.

      • The organization ID linked to the API key

      • description string Required

        The API key description. TIP: Useful when you have multiple API keys.

      • key string

        The API key. TIP: Since the API key is returned only once, save it in a safe place.

      • creation_date string(date-time) Required

        The date/time for when the API key is created.

      • expiration_date string(date-time)

        The date/time when the API key expires.

GET /users/auth/keys/_all
curl \
 -X GET https://{{hostname}}/api/v1/users/auth/keys/_all
Response examples (200)
{
  "keys": [
    {
      "id": "string",
      "user_id": "string",
      "organization_id": "string",
      "description": "string",
      "key": "string",
      "creation_date": "2025-05-04T09:42:00+00:00",
      "expiration_date": "2025-05-04T09:42:00+00:00"
    }
  ]
}

Delete API keys of multiple users

DELETE /users/auth/keys/_all

Delete or invalidate the API keys for multiple users.

Body Required

The request to delete API keys.

  • user_api_keys array[object] Required

    The list of API key IDs.

    Hide user_api_keys attributes Show user_api_keys attributes object

Responses

  • The API keys are deleted.

    Additional properties are allowed.

DELETE /users/auth/keys/_all
curl \
 -X DELETE https://{{hostname}}/api/v1/users/auth/keys/_all \
 -d '{"user_api_keys":[{"user_id":"string","api_key_id":"string"}]}'
Request examples
{
  "user_api_keys": [
    {
      "user_id": "string",
      "api_key_id": "string"
    }
  ]
}
Response examples (200)
{}

Get API key

GET /users/auth/keys/{api_key_id}

Retrieves the metadata for an API key.

Path parameters

Responses

  • The API key metadata is retrieved.

    Hide response attributes Show response attributes object
    • id string Required

      The API key ID.

    • user_id string

      The user ID.

    • The organization ID linked to the API key

    • description string Required

      The API key description. TIP: Useful when you have multiple API keys.

    • key string

      The API key. TIP: Since the API key is returned only once, save it in a safe place.

    • creation_date string(date-time) Required

      The date/time for when the API key is created.

    • expiration_date string(date-time)

      The date/time when the API key expires.

  • The {api_key_id} can't be found. (code: api_keys.key_not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is api_keys.key_not_found.

    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 /users/auth/keys/{api_key_id}
curl \
 -X GET https://{{hostname}}/api/v1/users/auth/keys/{api_key_id}
Response examples (200)
{
  "id": "string",
  "user_id": "string",
  "organization_id": "string",
  "description": "string",
  "key": "string",
  "creation_date": "2025-05-04T09:42:00+00:00",
  "expiration_date": "2025-05-04T09:42:00+00:00"
}
Response examples (404)
# Headers
x-cloud-error-codes: api_keys.key_not_found

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

Delete API key

DELETE /users/auth/keys/{api_key_id}

Delete or invalidate the API key.

Path parameters

Responses

  • The API key is deleted.

    Additional properties are allowed.

  • The {api_key_id} can't be found. (code: api_keys.key_not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is api_keys.key_not_found.

    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

DELETE /users/auth/keys/{api_key_id}
curl \
 -X DELETE https://{{hostname}}/api/v1/users/auth/keys/{api_key_id}
Response examples (200)
{}
Response examples (404)
# Headers
x-cloud-error-codes: api_keys.key_not_found

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

Available authentication methods

GET /users/auth/methods

Provides information about available authentication methods.

Responses

  • Available authentication methods response

    Hide response attributes Show response attributes object
    • password boolean Required

      Indicates that username and password authentication is available.

    • saml boolean Required

      Indicates that SAML single sign-on authentication is available.

    • openid boolean Required

      WARNING This endpoint is deprecated and scheduled to be removed in the next major version. This field is no longer used and will always be false.

    • sso_methods array[object] Required

      Lists details for the available single sign-on methods.

      Hide sso_methods attributes Show sso_methods attributes object
      • sso_type string Required

        Indicates the protocol of the single sign-on method.

        Value is saml.

      • name string Required

        The friendly name of the single sign-on method.

      • url string Required

        The URL to initiate the single sign-on login.

GET /users/auth/methods
curl \
 -X GET https://{{hostname}}/api/v1/users/auth/methods
Response examples (200)
{
  "password": true,
  "saml": true,
  "openid": true,
  "sso_methods": [
    {
      "sso_type": "saml",
      "name": "string",
      "url": "string"
    }
  ]
}

SAML callback

POST /users/auth/saml/_callback

Accepts a callback request from an identity provider and authenticates the user.

Responses

  • Redirects to the UI endpoint with an authorization token in the fragment and the relay state, if it was specified during the initialization.

    Additional properties are allowed.

  • The supplied SAML response is invalid. (code: root.unauthenticated)

    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

  • The administrator needs to configure the authentication cluster. (code: authc.no_authentication_cluster)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.no_authentication_cluster.

    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

  • The authentication cluster failed to process the request. The response body contains details about the error. (code: authc.authentication_cluster_error)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.authentication_cluster_error.

    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

POST /users/auth/saml/_callback
curl \
 -X POST https://{{hostname}}/api/v1/users/auth/saml/_callback
Response examples (302)
{}
Response examples (401)
# Headers
x-cloud-error-codes: root.unauthenticated

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (501)
# Headers
x-cloud-error-codes: authc.no_authentication_cluster

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (502)
# Headers
x-cloud-error-codes: authc.authentication_cluster_error

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

Initiate SAML protocol

GET /users/auth/saml/_init

Calls the authentication cluster to initiate SAML Single Sign-on (Web Browser SSO profile) protocol and redirects the user to the identity provider for authentication. The authentication cluster must be configured prior to initiation.

Query parameters

  • state string

    An optional relay state that is sent back to the client after the user is authenticated

Responses

  • Redirects the client to the identity provider with a SAML authentication request

    Additional properties are allowed.

  • The administrator needs to configure the authentication cluster. (code: authc.no_authentication_cluster)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.no_authentication_cluster.

    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

  • The authentication cluster failed to process the request. The response body contains details about the error. (code: authc.authentication_cluster_error)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is authc.authentication_cluster_error.

    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 /users/auth/saml/_init
curl \
 -X GET https://{{hostname}}/api/v1/users/auth/saml/_init
Response examples (302)
{}
Response examples (501)
# Headers
x-cloud-error-codes: authc.no_authentication_cluster

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (502)
# Headers
x-cloud-error-codes: authc.authentication_cluster_error

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

Get API key metadata for all keys created by the user

GET /users/{user_id}/auth/keys

Retrieves metadata for all API keys created by the given user.

Path parameters

Responses

  • The API key metadata is retrieved.

    Hide response attribute Show response attribute object
    • keys array[object] Required

      The list of API keys.

      Hide keys attributes Show keys attributes object
      • id string Required

        The API key ID.

      • user_id string

        The user ID.

      • The organization ID linked to the API key

      • description string Required

        The API key description. TIP: Useful when you have multiple API keys.

      • key string

        The API key. TIP: Since the API key is returned only once, save it in a safe place.

      • creation_date string(date-time) Required

        The date/time for when the API key is created.

      • expiration_date string(date-time)

        The date/time when the API key expires.

  • The {user_id} can't be found. (code: api_keys.user_not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is api_keys.user_not_found.

    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 /users/{user_id}/auth/keys
curl \
 -X GET https://{{hostname}}/api/v1/users/{user_id}/auth/keys
Response examples (200)
{
  "keys": [
    {
      "id": "string",
      "user_id": "string",
      "organization_id": "string",
      "description": "string",
      "key": "string",
      "creation_date": "2025-05-04T09:42:00+00:00",
      "expiration_date": "2025-05-04T09:42:00+00:00"
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: api_keys.user_not_found

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

Delete API keys for a user

DELETE /users/{user_id}/auth/keys

Delete or invalidate all of the API keys for a user.

Path parameters

Responses

  • The API key is deleted.

    Additional properties are allowed.

  • The {user_id} can't be found. (code: api_keys.user_not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is api_keys.user_not_found.

    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

DELETE /users/{user_id}/auth/keys
curl \
 -X DELETE https://{{hostname}}/api/v1/users/{user_id}/auth/keys
Response examples (200)
{}
Response examples (404)
# Headers
x-cloud-error-codes: api_keys.user_not_found

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

Get a user API key

GET /users/{user_id}/auth/keys/{api_key_id}

Retrieves the API key metadata for a user.

Path parameters

Responses

  • The API key metadata is retrieved.

    Hide response attributes Show response attributes object
    • id string Required

      The API key ID.

    • user_id string

      The user ID.

    • The organization ID linked to the API key

    • description string Required

      The API key description. TIP: Useful when you have multiple API keys.

    • key string

      The API key. TIP: Since the API key is returned only once, save it in a safe place.

    • creation_date string(date-time) Required

      The date/time for when the API key is created.

    • expiration_date string(date-time)

      The date/time when the API key expires.

  • The {api_key_id} can't be found. (code: api_keys.key_not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is api_keys.key_not_found.

    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 /users/{user_id}/auth/keys/{api_key_id}
curl \
 -X GET https://{{hostname}}/api/v1/users/{user_id}/auth/keys/{api_key_id}
Response examples (200)
{
  "id": "string",
  "user_id": "string",
  "organization_id": "string",
  "description": "string",
  "key": "string",
  "creation_date": "2025-05-04T09:42:00+00:00",
  "expiration_date": "2025-05-04T09:42:00+00:00"
}
Response examples (404)
# Headers
x-cloud-error-codes: api_keys.key_not_found

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

Delete an API key for a user

DELETE /users/{user_id}/auth/keys/{api_key_id}

Delete or invalidate an API key for a user.

Path parameters

Responses

  • The API key is deleted.

    Additional properties are allowed.

  • The {api_key_id} can't be found. (code: api_keys.key_not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is api_keys.key_not_found.

    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

DELETE /users/{user_id}/auth/keys/{api_key_id}
curl \
 -X DELETE https://{{hostname}}/api/v1/users/{user_id}/auth/keys/{api_key_id}
Response examples (200)
{}
Response examples (404)
# Headers
x-cloud-error-codes: api_keys.key_not_found

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

Billing costs analysis

Get an overview of your costs by organization ID.

Get costs overview for the organization. Currently unavailable in self-hosted ECE.

GET /billing/costs/{organization_id}

EXPERIMENTAL (it may change in future versions): Retrieves an overview of the costs by organization ID.

Path parameters

Query parameters

  • from string

    A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month.

  • to string

    A datetime for the end of the desired range for which to fetch costs. Defaults to the current date.

Responses

  • Top-level cost overview for the organization

    Hide response attributes Show response attributes object
    • costs object Required

      Costs for the organization

      Additional properties are allowed.

      Hide costs attributes Show costs attributes object
      • total number(double) Required

        Total costs

      • dimensions array[object] Required

        A collection of billing details by dimension.

        Hide dimensions attributes Show dimensions attributes object
        • type string Required

          The type of the billing dimension

          Values are capacity, data_in, data_internode, data_out, storage_api, or storage_bytes.

        • cost number(double) Required

          The cost of the billing dimension

    • trials number(double) Required

      Trial costs for the organization

    • hourly_rate number(double) Required

      Hourly rate applied.

    • balance object

      Balance for the organization

      Additional properties are allowed.

      Hide balance attributes Show balance attributes object
      • available number(double) Required

        Available balance

      • remaining number(double) Required

        Remaining balance

      • line_items array[object] Required

        A collection of order line items for for an organization

        Hide line_items attributes Show line_items attributes object
        • id string Required

          Line Item ID

        • ecu_quantity number(double) Required

          Original Elastic Consumption Unit (ECU) quantity

        • ecu_balance number(double) Required

          Elastic Consumption Unit (ECU) Balance

        • start string(date-time) Required

          Start of the line item's validity

        • end string(date-time) Required

          Expiration of the line item

  • The specified date range is invalid. (code: costs.invalid_date_range)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is costs.invalid_date_range.

    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

  • The current user does not have access to the requested organization. (code: organization.invalid_access)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.invalid_access.

    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

  • Organization not found. (code: organization.not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.not_found.

    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

  • An error occurred when fetching an overview of the costs for the organization. (code: billing_service.failed_request)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is billing_service.failed_request.

    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 /billing/costs/{organization_id}
curl \
 -X GET https://{{hostname}}/api/v1/billing/costs/{organization_id}
Response examples (200)
{
  "costs": {
    "total": 42.0,
    "dimensions": [
      {
        "type": "capacity",
        "cost": 42.0
      }
    ]
  },
  "trials": 42.0,
  "hourly_rate": 42.0,
  "balance": {
    "available": 42.0,
    "remaining": 42.0,
    "line_items": [
      {
        "id": "string",
        "ecu_quantity": 42.0,
        "ecu_balance": 42.0,
        "start": "2025-05-04T09:42:00+00:00",
        "end": "2025-05-04T09:42:00+00:00"
      }
    ]
  }
}
Response examples (400)
# Headers
x-cloud-error-codes: costs.invalid_date_range

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (403)
# Headers
x-cloud-error-codes: organization.invalid_access

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: organization.not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (500)
# Headers
x-cloud-error-codes: billing_service.failed_request

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

Get charts for the organization. Currently unavailable in self-hosted ECE.

GET /billing/costs/{organization_id}/charts

EXPERIMENTAL (it may change in future versions): Retrieves the usage charts for the organization.

Path parameters

Query parameters

  • from string

    A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month.

  • to string

    A datetime for the end of the desired range for which to fetch costs. Defaults to the current date.

  • The desired bucketing strategy for the charts. Defaults to daily.

    Values are daily or monthly. Default value is Daily.

Responses

  • The usage charts of an organization.

    Hide response attribute Show response attribute object
    • data array[object] Required

      The list of chart item

      Hide data attributes Show data attributes object
      • timestamp integer(int64) Required

        Axis X position

      • values array[object] Required

        the collection of values to plot the chart item

        Hide values attributes Show values attributes object
        • id string Required

          The id of chart item value

        • name string Required

          The name of the chart item value

        • value number(double) Required

          The actual value of the chart item value

  • The specified date range is invalid. (code: costs.invalid_date_range)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is costs.invalid_date_range.

    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

  • The current user does not have access to the requested organization. (code: organization.invalid_access)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.invalid_access.

    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

  • Organization not found. (code: organization.not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.not_found.

    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

  • Too many requests. (code: billing_service.rate_limited)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is billing_service.rate_limited.

    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

  • Error fetching the itemized costs for the organization. (code: billing_service.failed_request)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is billing_service.failed_request.

    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 /billing/costs/{organization_id}/charts
curl \
 -X GET https://{{hostname}}/api/v1/billing/costs/{organization_id}/charts
Response examples (200)
{
  "data": [
    {
      "timestamp": 42,
      "values": [
        {
          "id": "string",
          "name": "string",
          "value": 42.0
        }
      ]
    }
  ]
}
Response examples (400)
# Headers
x-cloud-error-codes: costs.invalid_date_range

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (403)
# Headers
x-cloud-error-codes: organization.invalid_access

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: organization.not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (429)
# Headers
x-cloud-error-codes: billing_service.rate_limited

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (500)
# Headers
x-cloud-error-codes: billing_service.failed_request

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

Get deployments costs for the organization. Currently unavailable in self-hosted ECE.

GET /billing/costs/{organization_id}/deployments

EXPERIMENTAL (it may change in future versions): Retrieves the costs associated with all deployments for the organization.

Headers

  • Accept string

    Accept header containing the content preference.

Path parameters

Query parameters

  • from string

    A datetime for the beginning of the desired range for which to fetch activity. Defaults to start of current month.

  • to string

    A datetime for the end of the desired range for which to fetch activity. Defaults to the current date.

Responses

  • The costs associated to a set of products

    Hide response attributes Show response attributes object
    • total_cost number(double) Required

      Total cost for all deployments

    • deployments array[object] Required

      Costs of the list of deployments

      Hide deployments attributes Show deployments attributes object
      • deployment_id string Required

        Elasticsearch deployment id

      • deployment_name string Required

        Elasticsearch deployment name

      • costs object Required

        Costs for the organization

        Additional properties are allowed.

        Hide costs attributes Show costs attributes object
        • total number(double) Required

          Total costs

        • dimensions array[object] Required

          A collection of billing details by dimension.

          Hide dimensions attributes Show dimensions attributes object
          • type string Required

            The type of the billing dimension

            Values are capacity, data_in, data_internode, data_out, storage_api, or storage_bytes.

          • cost number(double) Required

            The cost of the billing dimension

      • hourly_rate number(double) Required

        Price per hour

      • period object

        Period

        Additional properties are allowed.

        Hide period attributes Show period attributes object
        • start string(date-time) Required

          Start

        • end string(date-time) Required

          End

  • Invalid date range specified. (code: costs.invalid_date_range)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is costs.invalid_date_range.

    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

  • The current user does not have access to the requested organization. (code: organization.invalid_access)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.invalid_access.

    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

  • Organization not found. (code: organization.not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.not_found.

    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

  • An error occurred when fetching the costs associated with all deployments for the organization. (code: billing_service.failed_request)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is billing_service.failed_request.

    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 /billing/costs/{organization_id}/deployments
curl \
 -X GET https://{{hostname}}/api/v1/billing/costs/{organization_id}/deployments \
 -H "Accept: string"
Response examples (200)
{
  "total_cost": 42.0,
  "deployments": [
    {
      "deployment_id": "string",
      "deployment_name": "string",
      "costs": {
        "total": 42.0,
        "dimensions": [
          {
            "type": "capacity",
            "cost": 42.0
          }
        ]
      },
      "hourly_rate": 42.0,
      "period": {
        "start": "2025-05-04T09:42:00+00:00",
        "end": "2025-05-04T09:42:00+00:00"
      }
    }
  ]
}
Response examples (400)
# Headers
x-cloud-error-codes: costs.invalid_date_range

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (403)
# Headers
x-cloud-error-codes: organization.invalid_access

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: organization.not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (500)
# Headers
x-cloud-error-codes: billing_service.failed_request

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

Get charts by deployment. Currently unavailable in self-hosted ECE.

GET /billing/costs/{organization_id}/deployments/{deployment_id}/charts

EXPERIMENTAL (it may change in future versions): Retrieves the usage charts for the given deployment.

Path parameters

Query parameters

  • from string

    A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month.

  • to string

    A datetime for the end of the desired range for which to fetch costs. Defaults to the current date.

  • The desired bucketing strategy for the charts. Defaults to daily.

    Values are daily or monthly. Default value is Daily.

Responses

  • The usage charts of a deployment.

    Hide response attribute Show response attribute object
    • data array[object] Required

      The list of chart item

      Hide data attributes Show data attributes object
      • timestamp integer(int64) Required

        Axis X position

      • values array[object] Required

        the collection of values to plot the chart item

        Hide values attributes Show values attributes object
        • id string Required

          The id of chart item value

        • name string Required

          The name of the chart item value

        • value number(double) Required

          The actual value of the chart item value

  • The specified date range is invalid. (code: costs.invalid_date_range)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is costs.invalid_date_range.

    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

  • The current user does not have access to the requested organization. (code: organization.invalid_access)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.invalid_access.

    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

  • Organization not found. (code: organization.not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.not_found.

    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

  • Too many requests. (code: billing_service.rate_limited)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is billing_service.rate_limited.

    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

  • Error fetching the itemized costs for the organization. (code: billing_service.failed_request)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is billing_service.failed_request.

    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 /billing/costs/{organization_id}/deployments/{deployment_id}/charts
curl \
 -X GET https://{{hostname}}/api/v1/billing/costs/{organization_id}/deployments/{deployment_id}/charts
Response examples (200)
{
  "data": [
    {
      "timestamp": 42,
      "values": [
        {
          "id": "string",
          "name": "string",
          "value": 42.0
        }
      ]
    }
  ]
}
Response examples (400)
# Headers
x-cloud-error-codes: costs.invalid_date_range

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (403)
# Headers
x-cloud-error-codes: organization.invalid_access

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: organization.not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (429)
# Headers
x-cloud-error-codes: billing_service.rate_limited

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (500)
# Headers
x-cloud-error-codes: billing_service.failed_request

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

Get itemized costs by deployments. Currently unavailable in self-hosted ECE.

GET /billing/costs/{organization_id}/deployments/{deployment_id}/items

EXPERIMENTAL (it may change in future versions): Retrieves the itemized costs for the given deployment.

Headers

  • Accept string

    Determines the response body format. Can be either application/json or text/csv.

Path parameters

Query parameters

  • from string

    A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month.

  • to string

    A datetime for the end of the desired range for which to fetch costs. Defaults to the current date.

Responses

  • The costs associated to a set items billed for a single deployment.

    Hide response attributes Show response attributes object
    • costs object Required

      Costs for the organization

      Additional properties are allowed.

      Hide costs attributes Show costs attributes object
      • total number(double) Required

        Total costs

      • dimensions array[object] Required

        A collection of billing details by dimension.

        Hide dimensions attributes Show dimensions attributes object
        • type string Required

          The type of the billing dimension

          Values are capacity, data_in, data_internode, data_out, storage_api, or storage_bytes.

        • cost number(double) Required

          The cost of the billing dimension

    • data_transfer_and_storage array[object] Required

      List of the detailed costs associated to the Data Transfer and Storage (DTS) dimensions

      Hide data_transfer_and_storage attributes Show data_transfer_and_storage attributes object
      • cost number(double) Required

        Costs associated to the Data Transfer and Storage (DTS) dimensions for an organization

      • name string Required

        DTS dimension name

      • quantity object Required

        DTS usage

        Additional properties are allowed.

        Hide quantity attributes Show quantity attributes object
      • rate object Required

        Cost per unit

        Additional properties are allowed.

        Hide rate attributes Show rate attributes object
      • sku string Required

        DTS dimension Stock Keeping Unit (SKU)

      • type string Required

        Type of the DTS dimension usage

    • resources array[object] Required

      Costs of the list of resources

      Hide resources attributes Show resources attributes object
      • hours integer(int64) Required

        Resource usage in hours

      • instance_count integer(int32) Required

        Number of instances

      • period object Required

        Period

        Additional properties are allowed.

        Hide period attributes Show period attributes object
        • start string(date-time) Required

          Start

        • end string(date-time) Required

          End

      • kind string Required

        Kind of resource

        Values are elasticsearch, kibana, apm, integrations_server, appsearch, or enterprise_search.

      • price number(double) Required

        Resource price

      • price_per_hour number(double) Required

        Price per hour

      • name string Required

        Resource name

      • sku string Required

        Stock Keeping Unit (SKU)

  • The specified date range is invalid. (code: costs.invalid_date_range)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is costs.invalid_date_range.

    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

  • The current user does not have access to the requested organization. (code: organization.invalid_access)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.invalid_access.

    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

    • The organization was not found. (code: organization.not_found)
    • The Elasticsearch cluster was not found. (code: billing_service.es_cluster_id_not_found)
    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Values are organization.not_found or billing_service.es_cluster_id_not_found.

    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

  • An error occurred when fetching the itemized costs for the given deployment of the organization. (code: billing_service.failed_request)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is billing_service.failed_request.

    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 /billing/costs/{organization_id}/deployments/{deployment_id}/items
curl \
 -X GET https://{{hostname}}/api/v1/billing/costs/{organization_id}/deployments/{deployment_id}/items \
 -H "Accept: string"
Response examples (200)
{
  "costs": {
    "total": 42.0,
    "dimensions": [
      {
        "type": "capacity",
        "cost": 42.0
      }
    ]
  },
  "data_transfer_and_storage": [
    {
      "cost": 42.0,
      "name": "string",
      "quantity": {
        "value": 42,
        "formatted_value": "string"
      },
      "rate": {
        "value": 42.0,
        "formatted_value": "string"
      },
      "sku": "string",
      "type": "string"
    }
  ],
  "resources": [
    {
      "hours": 42,
      "instance_count": 42,
      "period": {
        "start": "2025-05-04T09:42:00+00:00",
        "end": "2025-05-04T09:42:00+00:00"
      },
      "kind": "elasticsearch",
      "price": 42.0,
      "price_per_hour": 42.0,
      "name": "string",
      "sku": "string"
    }
  ]
}
Response examples (400)
# Headers
x-cloud-error-codes: costs.invalid_date_range

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (403)
# Headers
x-cloud-error-codes: organization.invalid_access

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: organization.not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (500)
# Headers
x-cloud-error-codes: billing_service.failed_request

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

Get itemized costs for the organization. Currently unavailable in self-hosted ECE.

GET /billing/costs/{organization_id}/items

EXPERIMENTAL (it may change in future versions): Retrieves the itemized costs for the organization.

Path parameters

Query parameters

  • from string

    A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month.

  • to string

    A datetime for the end of the desired range for which to fetch costs. Defaults to the current date.

Responses

  • The costs associated to a set of items

    Hide response attributes Show response attributes object
    • costs object Required

      Costs for the organization

      Additional properties are allowed.

      Hide costs attributes Show costs attributes object
      • total number(double) Required

        Total costs

      • dimensions array[object] Required

        A collection of billing details by dimension.

        Hide dimensions attributes Show dimensions attributes object
        • type string Required

          The type of the billing dimension

          Values are capacity, data_in, data_internode, data_out, storage_api, or storage_bytes.

        • cost number(double) Required

          The cost of the billing dimension

    • data_transfer_and_storage array[object] Required

      List of the detailed costs associated to the Data Transfer and Storage (DTS) dimensions

      Hide data_transfer_and_storage attributes Show data_transfer_and_storage attributes object
      • cost number(double) Required

        Costs associated to the Data Transfer and Storage (DTS) dimensions for an organization

      • name string Required

        DTS dimension name

      • quantity object Required

        DTS usage

        Additional properties are allowed.

        Hide quantity attributes Show quantity attributes object
      • rate object Required

        Cost per unit

        Additional properties are allowed.

        Hide rate attributes Show rate attributes object
      • sku string Required

        DTS dimension Stock Keeping Unit (SKU)

      • type string Required

        Type of the DTS dimension usage

    • resources array[object] Required

      Costs of the list of resources

      Hide resources attributes Show resources attributes object
      • hours integer(int64) Required

        Resource usage in hours

      • instance_count integer(int32) Required

        Number of instances

      • period object Required

        Period

        Additional properties are allowed.

        Hide period attributes Show period attributes object
        • start string(date-time) Required

          Start

        • end string(date-time) Required

          End

      • kind string Required

        Kind of resource

        Values are elasticsearch, kibana, apm, integrations_server, appsearch, or enterprise_search.

      • price number(double) Required

        Resource price

      • price_per_hour number(double) Required

        Price per hour

      • name string Required

        Resource name

      • sku string Required

        Stock Keeping Unit (SKU)

  • The specified date range is invalid. (code: costs.invalid_date_range)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is costs.invalid_date_range.

    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

  • The current user does not have access to the requested organization. (code: organization.invalid_access)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.invalid_access.

    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

  • Organization not found. (code: organization.not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is organization.not_found.

    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

  • Error fetching the itemized costs for the organization. (code: billing_service.failed_request)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is billing_service.failed_request.

    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 /billing/costs/{organization_id}/items
curl \
 -X GET https://{{hostname}}/api/v1/billing/costs/{organization_id}/items
Response examples (200)
{
  "costs": {
    "total": 42.0,
    "dimensions": [
      {
        "type": "capacity",
        "cost": 42.0
      }
    ]
  },
  "data_transfer_and_storage": [
    {
      "cost": 42.0,
      "name": "string",
      "quantity": {
        "value": 42,
        "formatted_value": "string"
      },
      "rate": {
        "value": 42.0,
        "formatted_value": "string"
      },
      "sku": "string",
      "type": "string"
    }
  ],
  "resources": [
    {
      "hours": 42,
      "instance_count": 42,
      "period": {
        "start": "2025-05-04T09:42:00+00:00",
        "end": "2025-05-04T09:42:00+00:00"
      },
      "kind": "elasticsearch",
      "price": 42.0,
      "price_per_hour": 42.0,
      "name": "string",
      "sku": "string"
    }
  ]
}
Response examples (400)
# Headers
x-cloud-error-codes: costs.invalid_date_range

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (403)
# Headers
x-cloud-error-codes: organization.invalid_access

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: organization.not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (500)
# Headers
x-cloud-error-codes: billing_service.failed_request

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

Comments

Manage resource comments.

List Comments

GET /comments/{resource_type}/{resource_id}

Retrieves all the comments for a given Resource, in reverse modified time order.

Path parameters

  • resource_type string Required

    The kind of Resource that a Comment belongs to. Should be one of [elasticsearch, kibana, apm, appsearch, enterprise_search, integrations_server, allocator, constructor, runner, proxy].

  • resource_id string Required

    Id of the Resource that a Comment belongs to.

Responses

  • The Comments

    Hide response attribute Show response attribute object
    • values array[object] Required

      The list of comments

      Hide values attributes Show values attributes object
      • comment object Required

        The comment

        Additional properties are allowed.

        Hide comment attributes Show comment attributes object
        • id string Required

          The id of this Comment

        • user_id string Required

          The user id of the user who wrote this Comment

        • message string Required

          The message content of this Comment

      • metadata object Required

        The metadata

        Additional properties are allowed.

        Hide metadata attributes Show metadata attributes object
GET /comments/{resource_type}/{resource_id}
curl \
 -X GET https://{{hostname}}/api/v1/comments/{resource_type}/{resource_id}
Response examples (200)
{
  "values": [
    {
      "comment": {
        "id": "string",
        "user_id": "string",
        "message": "string"
      },
      "metadata": {
        "created_time": "2025-05-04T09:42:00+00:00",
        "modified_time": "2025-05-04T09:42:00+00:00",
        "version": "string"
      }
    }
  ]
}

Create a Comment

POST /comments/{resource_type}/{resource_id}

Creates a comment for the given Resource.

Path parameters

  • resource_type string Required

    The kind of Resource that a Comment belongs to. Should be one of [elasticsearch, kibana, apm, appsearch, enterprise_search, integrations_server, allocator, constructor, runner, proxy].

  • resource_id string Required

    Id of the Resource that a Comment belongs to.

Body Required

Data for comment creation

  • message string Required

    The message for the Comment.

Responses

  • The Comment that was just created.

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object
    • id string Required

      The id of this Comment

    • user_id string Required

      The user id of the user who wrote this Comment

    • message string Required

      The message content of this Comment

  • Your current session does not have a user id associated with it. (code: comments.no_user_id)

    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

  • No Resource of the given type and id exist. (code: comments.resource_does_not_exist)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is comments.resource_does_not_exist.

    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

  • A Comment already exists with the generated id. Please try again. (code: comments.id_already_exists)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is comments.id_already_exists.

    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

POST /comments/{resource_type}/{resource_id}
curl \
 -X POST https://{{hostname}}/api/v1/comments/{resource_type}/{resource_id} \
 -d '{"message":"string"}'
Request examples
{
  "message": "string"
}
Response examples (201)
# Headers
x-cloud-resource-version: string
x-cloud-resource-created: string
x-cloud-resource-last-modified: string

# Payload
{
  "id": "string",
  "user_id": "string",
  "message": "string"
}
Response examples (401)
# Headers
x-cloud-error-codes: comments.no_user_id

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: comments.resource_does_not_exist

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (409)
# Headers
x-cloud-error-codes: comments.id_already_exists

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

Get Comment

GET /comments/{resource_type}/{resource_id}/{comment_id}

Retrieves a Comment.

Path parameters

  • resource_type string Required

    The kind of Resource that a Comment belongs to. Should be one of [elasticsearch, kibana, apm, appsearch, enterprise_search, integrations_server, allocator, constructor, runner, proxy].

  • resource_id string Required

    Id of the Resource that a Comment belongs to.

  • comment_id string Required

    Id of a Comment

Responses

  • The Comment

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object
    • id string Required

      The id of this Comment

    • user_id string Required

      The user id of the user who wrote this Comment

    • message string Required

      The message content of this Comment

  • The Comment you want does not exist. (code: comments.comment_does_not_exist)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is comments.comment_does_not_exist.

    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 /comments/{resource_type}/{resource_id}/{comment_id}
curl \
 -X GET https://{{hostname}}/api/v1/comments/{resource_type}/{resource_id}/{comment_id}
Response examples (200)
# Headers
x-cloud-resource-version: string
x-cloud-resource-created: string
x-cloud-resource-last-modified: string

# Payload
{
  "id": "string",
  "user_id": "string",
  "message": "string"
}
Response examples (404)
# Headers
x-cloud-error-codes: comments.comment_does_not_exist

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

Update Comment

PUT /comments/{resource_type}/{resource_id}/{comment_id}

Updates a Comment.

Path parameters

  • resource_type string Required

    The kind of Resource that a Comment belongs to. Should be one of [elasticsearch, kibana, apm, appsearch, enterprise_search, integrations_server, allocator, constructor, runner, proxy].

  • resource_id string Required

    Id of the Resource that a Comment belongs to.

  • comment_id string Required

    Id of a Comment

Query parameters

  • version string

    If specified then checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)

Body Required

The Comment update data.

  • message string Required

    The message for the Comment.

Responses

  • Comment updated successfully.

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object
    • id string Required

      The id of this Comment

    • user_id string Required

      The user id of the user who wrote this Comment

    • message string Required

      The message content of this Comment

    • The Comment does not belong to you. (code: comments.unauthorised)
    • Your current session does not have a user id associated with it. (code: comments.no_user_id)
    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Values are comments.unauthorised or comments.no_user_id.

    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

  • The Comment you want does not exist. (code: comments.comment_does_not_exist)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is comments.comment_does_not_exist.

    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

  • The version you sent does not match the persisted version. (code: comments.version_conflict)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is comments.version_conflict.

    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

PUT /comments/{resource_type}/{resource_id}/{comment_id}
curl \
 -X PUT https://{{hostname}}/api/v1/comments/{resource_type}/{resource_id}/{comment_id} \
 -d '{"message":"string"}'
Request examples
{
  "message": "string"
}
Response examples (200)
# Headers
x-cloud-resource-version: string
x-cloud-resource-created: string
x-cloud-resource-last-modified: string

# Payload
{
  "id": "string",
  "user_id": "string",
  "message": "string"
}
Response examples (401)
# Headers
x-cloud-error-codes: comments.unauthorised

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: comments.comment_does_not_exist

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (409)
# Headers
x-cloud-error-codes: comments.version_conflict

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

Delete Comment

DELETE /comments/{resource_type}/{resource_id}/{comment_id}

Deletes a Comment.

Path parameters

  • resource_type string Required

    The kind of Resource that a Comment belongs to. Should be one of [elasticsearch, kibana, apm, appsearch, enterprise_search, integrations_server, allocator, constructor, runner, proxy].

  • resource_id string Required

    Id of the Resource that a Comment belongs to.

  • comment_id string Required

    Id of a Comment

Query parameters

  • version string

    If specified then checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)

Responses

  • Comment deleted successfully.

    Hide headers attributes Show headers attributes

    Additional properties are allowed.

    • The Comment does not belong to you. (code: comments.unauthorised)
    • Your current session does not have a user id associated with it. (code: comments.no_user_id)
    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Values are comments.unauthorised or comments.no_user_id.

    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

  • The Comment you want does not exist. (code: comments.comment_does_not_exist)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is comments.comment_does_not_exist.

    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

  • The version you sent does not match the persisted version. (code: comments.version_conflict)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is comments.version_conflict.

    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

DELETE /comments/{resource_type}/{resource_id}/{comment_id}
curl \
 -X DELETE https://{{hostname}}/api/v1/comments/{resource_type}/{resource_id}/{comment_id}
Response examples (200)
# Headers
x-cloud-resource-version: string
x-cloud-resource-created: string
x-cloud-resource-last-modified: string

# Payload
{}
Response examples (401)
# Headers
x-cloud-error-codes: comments.unauthorised

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: comments.comment_does_not_exist

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (409)
# Headers
x-cloud-error-codes: comments.version_conflict

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

Deployments

Perform CRUD operations, resync, and commands on your deployments.