Clusters - Apm - CRUD

Get clusters

Retrieves cluster information for all APM clusters.

Request

GET /api/v1/clusters/apm

Query parameters

Name Type Required Description

from

integer; default: 0

N

The number of clusters to skip.

q

string

N

An optional query to filter APM clusters by. Maps to an Elasticsearch query_string query.

show_hidden

boolean; default: false

N

Includes the hidden clusters in the response.

show_metadata

boolean; default: false

N

Includes all of the cluster metadata in the response. NOTE: Responses can include a large amount of metadata, as well as credentials.

show_plan_defaults

boolean; default: false

N

When plans are shown, includes the default values in the response. NOTE: This option results in large responses.

show_plans

boolean

N

Includes the active and pending plan information in the response. NOTE: This option can result in large responses.

show_settings

boolean; default: false

N

Includes the cluster settings in the response.

size

integer; default: 100

N

The maximum number of clusters to include in the response. For all clusters, use -1. NOTE: This option can result in large responses.

Responses

200
(ApmsInfo) The information for the APM server is retrieved.
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/apm \
-u $CLOUD_USER:$CLOUD_KEY

Create cluster

Creates an APM cluster for a given Elasticsearch cluster.

Request

POST /api/v1/clusters/apm

Query parameters

Name Type Required Description

validate_only

boolean; default: false

N

When true, validates the cluster definition without creating the cluster.

Request body

(CreateApmRequest) (required) The cluster definition

Responses

200
(ApmCrudResponse) The APM server plan is valid. The return object contains an internal representation of the plan that you can use for debugging.
201
(ApmCrudResponse) The APM server plan is valid and the creation process has started.
400
(BasicFailedReply) The APM server plan contains errors. (code: 'clusters.cluster_invalid_plan' and 'clusters.plan_feature_not_implemented')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPOST {{hostname}}/api/v1/clusters/apm \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "display_name" : "string",
   "elasticsearch_cluster_id" : "string",
   "plan" : {
      "apm" : {
         "docker_image" : "string",
         "system_settings" : {
            "debug_enabled" : "string",
            "elasticsearch_password" : "string",
            "elasticsearch_url" : "string",
            "elasticsearch_username" : "string",
            "kibana_url" : "string",
            "secret_token" : "string"
         },
         "user_settings_json" : {},
         "user_settings_override_json" : {},
         "user_settings_override_yaml" : "string",
         "user_settings_yaml" : "string",
         "version" : "string"
      },
      "cluster_topology" : [
         {
            "apm" : null,
            "instance_configuration_id" : "string",
            "size" : {
               "resource" : "string",
               "value" : 0
            },
            "zone_count" : 0
         }
      ],
      "transient" : {
         "plan_configuration" : {
            "calm_wait_time" : 0,
            "cluster_reboot" : "string",
            "extended_maintenance" : true,
            "move_allocators" : [
               {
                  "allocator_down" : true,
                  "from" : "string",
                  "to" : [
                     "string"
                  ]
               }
            ],
            "move_instances" : [
               {
                  "from" : "string",
                  "instance_down" : true,
                  "to" : [
                     "string"
                  ]
               }
            ],
            "preferred_allocators" : [
               "string"
            ],
            "reallocate_instances" : true,
            "timeout" : 0
         },
         "strategy" : {
            "grow_and_shrink" : {},
            "rolling" : {
               "allow_inline_resize" : true,
               "group_by" : "string",
               "shard_init_wait_time" : 0,
               "skip_synced_flush" : true
            },
            "rolling_grow_and_shrink" : {}
         }
      }
   }
}
'

Delete cluster

Deletes an APM cluster. Requires that you have already successfully issued _shutdown command against the cluster.

Request

DELETE /api/v1/clusters/apm/{cluster_id}

Path parameters

Name Type Required Description

cluster_id

string

Y

The APM deployment identifier.

Responses

200
(EmptyResponse) The APM server is deleted.
404
(BasicFailedReply) The {cluster_id} can't be found. (code: 'clusters.cluster_not_found')
412
(BasicFailedReply) To delete the APM server, you must first shut it down. (code: 'clusters.cluster_plan_state_error')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XDELETE {{hostname}}/api/v1/clusters/apm/{cluster_id} \
-u $CLOUD_USER:$CLOUD_KEY

Get cluster

Retrieves cluster information for a APM cluster.

Request

GET /api/v1/clusters/apm/{cluster_id}

Path parameters

Name Type Required Description

cluster_id

string

Y

The APM deployment identifier.

Query parameters

Name Type Required Description

show_metadata

boolean; default: false

N

Includes all of the cluster metadata in the response. NOTE: Responses can include a large amount of metadata, as well as credentials.

show_plan_defaults

boolean; default: false

N

When plans are shown, includes the default values in the response. NOTE: This option results in large responses.

show_plan_logs

boolean; default: false

N

Includes the active, pending, and historical plan information in the attempt log. NOTE: This option can result in large responses.

show_plans

boolean; default: true

N

Includes the active and pending plan information in the response. NOTE: This option can result in large responses.

show_settings

boolean; default: false

N

Includes the cluster settings in the response.

Responses

200
(ApmInfo) The information for the APM server is retrieved.
404
(BasicFailedReply) The {cluster_id} can't be found. (code: 'clusters.cluster_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/apm/{cluster_id} \
-u $CLOUD_USER:$CLOUD_KEY