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.


Accounts

Retrieve and update the current Elasticsearch Service account.





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"
      ]
    }
  ]
}









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"
      ]
    }
  ]
}




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"
    }
  ]
}




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"
    }
  ]
}












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"
    }
  ]
}
















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 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 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"
      ]
    }
  ]
}








Comments

Manage resource comments.





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.