Capture diagnostics for an Elasticsearch or Kibana resource

edit

Capture diagnostics for an Elasticsearch or Kibana resource

edit

Retrieves a diagnostic bundle from an active cluster. To successfully retrieve a diagnostic bundle, the cluster must be responsive.

Request

edit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/diagnostics/_capture

Path parameters

edit
Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment

ref_id

string

Y

User-specified RefId for the Resource (or '_main' if there is only one).

resource_kind

string

Y

The kind of resource (one of elasticsearch or kibana).

Responses

edit
200

(string as byte)

The diagnostic bundle as a zip file

404

(BasicFailedReply)

  • The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found)
  • The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response
412

(BasicFailedReply)

The diagnostics cannot be generated because the cluster is either stopped or initializing. (code: clusters.cluster_plan_state_error)

Headers

x-cloud-error-codes (string; allowed values: [clusters.cluster_plan_state_error])
The error codes associated with the response
449

(BasicFailedReply)

Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response

Request example

edit
curl -XPOST https://{{hostname}}/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/diagnostics/_capture \
-H "Authorization: ApiKey $ECE_API_KEY"