POST /api/v1/cloud-connected/clusters/{id}/apikey/_rotate

Rotate the API key used to manage this Cloud Connected cluster. A new key is returned, and the previous key is revoked after 7 days or when _revoke-pending is called.

Headers

  • If-Match string

    ETag value fetched in a previous GET cluster request. Used to prevent simultaneous updates

Path parameters

  • id string Required

    The ID of the Cloud Connected cluster

    Format should match the following pattern: ^[a-z0-9]{32}$.

Responses

  • 200 application/json

    The new API Key for the Cloud Connected service

    Hide response attribute Show response attribute object
    • key string

      The API Key to manage the Cloud Connected cluster.

  • 401 application/json

    Unauthorized

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

      An error response returned by the API.

      • message string Required

        A human-readable message of the error.

      • code string Required

        An identifier for this type of error.

  • 403 application/json

    Forbidden

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

      An error response returned by the API.

      • message string Required

        A human-readable message of the error.

      • code string Required

        An identifier for this type of error.

  • 404 application/json

    Not Found

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

      An error response returned by the API.

      • message string Required

        A human-readable message of the error.

      • code string Required

        An identifier for this type of error.

POST /api/v1/cloud-connected/clusters/{id}/apikey/_rotate
curl \
 --request POST 'https://api.elastic-cloud.com/api/v1/cloud-connected/clusters/{id}/apikey/_rotate' \
 --header "Authorization: $API_KEY" \
 --header "If-Match: string"
Response examples (200)
{
  "key": "VXNlci1JRDoxMjM0NTY3ODkwYWJjZGVmMTIzNDU2Nzg5MGFiY2RlZg=="
}
Response examples (401)
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}
Response examples (403)
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}
Response examples (404)
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}