Stack - Versions - CRUD

Get stack versions

By default, retrieves only the available Elastic Stack versions. To retrieve all of the Elastic Stack versions, use the show_deleted parameter.

Request

GET /api/v1/stack/versions

Query parameters

Name Type Required Description

show_deleted

boolean

N

Whether to show deleted stack versions or not

Responses

200
(StackVersionConfigs) List of all available stack configurations with template version and structure
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/stack/versions \
-u $CLOUD_USER:$CLOUD_KEY

Upload stack pack

Creates or updates an Elastic Stack pack and template. The endpoint supports multipart/form-data requests, as well as application/zip and application/octet-stream requests with a binary body. The maximum size of the payload is 1Mb. When the archive contains an Elastic Stack configuration that is available through the API, the configuration and template are overwritten.

Request

POST /api/v1/stack/versions

Form Parameters

Name Type Required Description

file

file

Y

Zip file that contains one or multiple stack configurations

Responses

200
(StackVersionArchiveProcessingResult) The Stack Pack was processed successfully
400
(BasicFailedReply) Bad archive or some unexpected error occurred
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/stack/versions \
-u $CLOUD_USER:$CLOUD_KEY

Delete stack version

Uses the deleted flag, which removes only that version of the Elastic Stack from the list of available versions. To restore the version, send an update request. For more information, see the PUT request.

Request

DELETE /api/v1/stack/versions/{version}

Path parameters

Name Type Required Description

version

string

Y

The Elastic Stack version.

Responses

200
(EmptyResponse) The Elastic Stack version was marked for deletion successfully
404
(BasicFailedReply) The Elastic Stack version was not found
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/stack/versions/{version} \
-u $CLOUD_USER:$CLOUD_KEY

Get stack version

Retrieves the Elastic Stack version and template.

Request

GET /api/v1/stack/versions/{version}

Path parameters

Name Type Required Description

version

string

Y

The Elastic Stack version.

Responses

200
(StackVersionConfig) The Elastic Stack version was found
404
(BasicFailedReply) The Elastic Stack version was 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/stack/versions/{version} \
-u $CLOUD_USER:$CLOUD_KEY

Update stack version

Updates the Elastic Stack version configuration.

Request

PUT /api/v1/stack/versions/{version}

Path parameters

Name Type Required Description

version

string

Y

The Elastic Stack version.

Request body

(StackVersionConfigPost) (required) Elastic Stack configuration object

Responses

200
(StackVersionConfig) The Elastic Stack version was updated successfully
404
(BasicFailedReply) The Elastic Stack version was not found
Warning

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

Request example

curl -XPUT {{hostname}}/api/v1/stack/versions/{version} \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "apm" : {
      "blacklist" : [
         "string"
      ],
      "capacity_constraints" : {
         "max" : 0,
         "min" : 0
      },
      "compatible_node_types" : [
         "string"
      ],
      "docker_image" : "string",
      "settings" : {},
      "version" : "string"
   },
   "elasticsearch" : {
      "blacklist" : [
         "string"
      ],
      "capacity_constraints" : null,
      "compatible_node_types" : [
         "string"
      ],
      "default_plugins" : [
         "string"
      ],
      "docker_image" : "string",
      "node_types" : [
         {
            "capacity_constraints" : null,
            "compatible_node_types" : [
               "string"
            ],
            "description" : "string",
            "name" : "string",
            "node_type" : "string",
            "settings" : {}
         }
      ],
      "plugins" : [
         "string"
      ],
      "settings" : {}
   },
   "kibana" : {
      "blacklist" : [
         "string"
      ],
      "capacity_constraints" : null,
      "compatible_node_types" : [
         "string"
      ],
      "docker_image" : "string",
      "settings" : {},
      "version" : "string"
   },
   "metadata" : {
      "min_platform_version" : "string",
      "notes" : "string",
      "pre_release" : true,
      "schema_version" : 0
   }
}
'