Elastic Stack (ELK Stack) Deployments API

The Deployments API from Elastic Stack (ELK Stack) — 58 operation(s) for deployments.

Operations 72

GET /deployments List Deployments #
POST /deployments Create Deployment #
POST /deployments/_resync Resynchronize Deployments #
POST /deployments/_search Search Deployments #
POST /deployments/eligible-remote-clusters Get eligible remote clusters #
GET /deployments/{deployment_id} Get Deployment #
PUT /deployments/{deployment_id} Update Deployment #
DELETE /deployments/{deployment_id} Delete Deployment #
POST /deployments/{deployment_id}/_restore Restores a shutdown Deployment #
POST /deployments/{deployment_id}/_resync Resynchronize Deployment #
POST /deployments/{deployment_id}/_shutdown Shuts down Deployment #
GET /deployments/{deployment_id}/apm/{ref_id} Get Deployment APM Resource Info #
POST /deployments/{deployment_id}/apm/{ref_id}/_reset-token Reset the secret token for an APM resource. #
GET /deployments/{deployment_id}/appsearch/{ref_id} Get Deployment App Search Resource Info #
GET /deployments/{deployment_id}/appsearch/{ref_id}/read_only_mode Set AppSearch read-only status #
PUT /deployments/{deployment_id}/appsearch/{ref_id}/read_only_mode Set AppSearch read-only status #
GET /deployments/{deployment_id}/certificate-authority Get certificate authority #
GET /deployments/{deployment_id}/elasticsearch/{ref_id} Get Deployment Elasticsearch Resource Info #
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/_enable-ccr Migrate Elasticsearch and associated Kibana resources to enable CCR #
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/_enable-ilm Migrate Elasticsearch resource to use ILM #
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/_enable-slm Migrate Elasticsearch resource to use SLM #
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/_reset-password Reset 'elastic' user password #
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/_restart Restart Deployment Elasticsearch Resource #
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/_shutdown Shutdown Deployment Elasticsearch Resource #
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/eligible-remote-clusters Get eligible remote clusters #
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/instances/{instance_ids}/_move Move Elasticsearch resource instances #
GET /deployments/{deployment_id}/elasticsearch/{ref_id}/keystore Get the items in the Elasticsearch resource keystore #
PATCH /deployments/{deployment_id}/elasticsearch/{ref_id}/keystore Add or remove items from the Elasticsearch resource keystore #
GET /deployments/{deployment_id}/elasticsearch/{ref_id}/remote-clusters Get certificate based remote clusters #
PUT /deployments/{deployment_id}/elasticsearch/{ref_id}/remote-clusters Set certificate based remote clusters #
GET /deployments/{deployment_id}/elasticsearch/{ref_id}/snapshot/repository List the attached snapshot repositories #
POST /deployments/{deployment_id}/elasticsearch/{ref_id}/snapshot/repository Create a snapshot repository for Elasticsearch resource #
DELETE /deployments/{deployment_id}/elasticsearch/{ref_id}/snapshot/repository/{repository_name} Remove the attached snapshot repository #
GET /deployments/{deployment_id}/elasticsearch/{ref_id}/tiers Get Elasticsearch tiers #
PATCH /deployments/{deployment_id}/elasticsearch/{ref_id}/tiers Update Elasticsearch tiers #
GET /deployments/{deployment_id}/enterprise_search/{ref_id} Get Deployment Enterprise Search Resource Info #
GET /deployments/{deployment_id}/heap_dumps Get details about heap dumps for a Deployment #
GET /deployments/{deployment_id}/integrations_server/{ref_id} Get Deployment Integrations Server Resource Info #
GET /deployments/{deployment_id}/kibana/{ref_id} Get Deployment Kibana Resource Info #
GET /deployments/{deployment_id}/migrate_template Build request to migrate deployment to a different template #
GET /deployments/{deployment_id}/tags Get the tags for a Deployment #
PUT /deployments/{deployment_id}/tags Set the tags for a Deployment #
POST /deployments/{deployment_id}/upgrade Upgrade a Deployment to a new Elastic Stack version #
GET /deployments/{deployment_id}/upgrade_assistant/status Get Deployment upgrade assistant status #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/_restore Restores a shutdown resource #
GET /deployments/{deployment_id}/{resource_kind}/{ref_id}/activity/{attempt_id} Get plan activity #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/diagnostics/_capture Capture diagnostics for an Elasticsearch or Kibana resource #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/_start Start all instances #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/_stop Stop all instances #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/maintenance-mode/_start Start maintenance mode (all instances) #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/maintenance-mode/_stop Stop maintenance mode (all instances) #
PUT /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/overrides Set size overrides #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/_start Start instances #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/_stop Stop instances #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/maintenance-mode/_start Start maintenance mode #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/maintenance-mode/_stop Stop maintenance mode #
PUT /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/overrides Set size overrides #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_id}/heap_dump/_capture Capture a new on-demand heap dump for the given instance #
GET /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_id}/heap_dump/_download Download the given instance's heap dump #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_id}/thread_dump/_capture Capture a new thread dump for the given instance #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/metadata/raw Set a Deployment's resource metadata #
PATCH /deployments/{deployment_id}/{resource_kind}/{ref_id}/metadata/raw Patch a Deployment's resource metadata #
DELETE /deployments/{deployment_id}/{resource_kind}/{ref_id}/plan/pending Cancel resource pending plan #
GET /deployments/{deployment_id}/{resource_kind}/{ref_id}/proxy/{proxy_path} Proxy HTTP GET request #
POST /deployments/{deployment_id}/{resource_kind}/{ref_id}/proxy/{proxy_path} Proxy HTTP POST request #
PUT /deployments/{deployment_id}/{resource_kind}/{ref_id}/proxy/{proxy_path} Proxy HTTP PUT request #
DELETE /deployments/{deployment_id}/{resource_kind}/{ref_id}/proxy/{proxy_path} Proxy HTTP DELETE request #
GET /deployments/{deployment_id}/{resource_kind}/{ref_id}/user_settings Get the user settings of a Deployment resource #
PUT /deployments/{deployment_id}/{resource_kind}/{ref_id}/user_settings Update user settings for a deployment resource #
DELETE /deployments/{deployment_id}/{stateless_resource_kind}/{ref_id} Delete Stateless Resource from Deployment #
POST /deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_restart Restart Deployment Stateless Resource #
POST /deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_shutdown Shutdown Deployment Stateless Resource #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elk-stack-deployments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elk-stack-deployments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: '1'
  title: Elastic Cloud Enterprise Deployments API
  termsOfService: ''
servers:
- url: https://{{hostname}}/api/v1
security:
- basicAuth: []
- apiKey: []
tags:
- name: Deployments
paths:
  /deployments:
    get:
      tags:
      - Deployments
      summary: List Deployments
      description: List Deployments.
      operationId: list-deployments
      responses:
        '200':
          description: The list of deployments that belong to the authenticated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentsListResponse'
        '401':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - CRUD
    post:
      tags:
      - Deployments
      summary: Create Deployment
      description: Creates a Deployment.
      operationId: create-deployment
      parameters:
      - name: request_id
        in: query
        description: An optional idempotency token - if two create requests share the same request_id token (min size 32 characters, max 128) then only one deployment will be created, the second request will return the info of that deployment (in the same format described below, but with blanks for auth-related fields)
        required: false
        schema:
          type: string
      - name: validate_only
        in: query
        description: If true, will just validate the Deployment definition but will not perform the creation
        required: false
        schema:
          type: boolean
          default: false
      - name: template_id
        in: query
        description: An optional template id - if present, the referenced template will be used to fill in the resources field of the deployment creation request. If any resources are present in the request together with the template, the ones coming in the request will prevail and no merging with the template will be performed.
        required: false
        schema:
          type: string
      responses:
        '201':
          description: The request was valid and a new deployment was created
          headers:
            x-cloud-resource-version:
              description: The resource version, which is used to avoid update conflicts with concurrent operations
              schema:
                type: string
            x-cloud-resource-created:
              description: The date-time when the resource was created (ISO format relative to UTC)
              schema:
                type: string
            x-cloud-resource-last-modified:
              description: The date-time when the resource was last modified (ISO format relative to UTC)
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentCreateResponse'
        '202':
          description: The request was valid and deployment creation had already been started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentCreateResponse'
        '200':
          description: The request was valid (used when validate_only is true).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentCreateResponse'
        '400':
          description: The deployment request had errors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '401':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - CRUD
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeploymentCreateRequest'
        description: The deployment definition
        required: true
  /deployments/_resync:
    post:
      tags:
      - Deployments
      summary: Resynchronize Deployments
      description: Resynchronizes the search index for all the deployments.
      operationId: resync-deployments
      parameters:
      - name: skip_matching_version
        in: query
        description: When true, skips the document indexing when the version matches the in-memory copy.
        required: false
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: The deployments resync operation executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexSynchronizationResults'
        '500':
          description: 'The deployments resync operation failed. (code: `deployments.resync_failed`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.resync_failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - resync
  /deployments/_search:
    post:
      tags:
      - Deployments
      summary: Search Deployments
      description: Retrieves the information for all of the deployments that match the specified query.
      operationId: search-deployments
      parameters:
      - name: minimal_metadata
        in: query
        description: Comma separated list of attributes to include in response for deployments found. Useful for reducing response size when retrieving many deployments. Use of this parameter moves the result to the minimal_metadata section of the response.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: The list of deployments that match the specified query and belong to the authenticated user.
          headers:
            x-cloud-resource-version:
              description: The resource version, which is used to avoid update conflicts with concurrent operations
              schema:
                type: string
            x-cloud-resource-created:
              description: The date-time when the resource was created (ISO format relative to UTC)
              schema:
                type: string
            x-cloud-resource-last-modified:
              description: The date-time when the resource was last modified (ISO format relative to UTC)
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentsSearchResponse'
      x-doc:
        tag: Deployment - Commands
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
        description: (Optional) The search query to run. When not specified, all of the deployments are matched.
  /deployments/eligible-remote-clusters:
    post:
      tags:
      - Deployments
      summary: Get eligible remote clusters
      description: Returns the list of deployments which contain eligible remote clusters for a specific version.
      operationId: search-eligible-remote-clusters
      parameters:
      - name: version
        in: query
        description: The version of the Elasticsearch cluster cluster that will potentially be configured to have remote clusters.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: List of deployments which contains eligible remote clusters for a specific version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentsSearchResponse'
        '400':
          description: 'The provided version is invalid. (code: `stackpack.invalid_version`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - stackpack.invalid_version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - Remote Clusters
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
        description: (Optional) The search query to run against all deployments containing eligible remote clusters. When not specified, all the eligible deployments are matched.
  /deployments/{deployment_id}:
    get:
      tags:
      - Deployments
      summary: Get Deployment
      description: Retrieves information about a Deployment.
      operationId: get-deployment
      parameters:
      - name: deployment_id
        in: path
        description: Identifier for the Deployment
        required: true
        schema:
          type: string
      - name: show_security
        in: query
        description: Whether to include the Elasticsearch 2.x security information in the response - can be large per cluster and also include credentials
        required: false
        schema:
          type: boolean
          default: false
      - name: show_metadata
        in: query
        description: Whether to include the full cluster metadata in the response - can be large per cluster and also include credentials
        required: false
        schema:
          type: boolean
          default: false
      - name: show_plans
        in: query
        description: Whether to include the full current and pending plan information in the response - can be large per cluster
        required: false
        schema:
          type: boolean
          default: true
      - name: show_plan_logs
        in: query
        description: Whether to include with the current and pending plan information the attempt log - can be very large per cluster
        required: false
        schema:
          type: boolean
          default: false
      - name: show_plan_history
        in: query
        description: "Whether to include the plan history with the current and pending plan information. The results can be very large per cluster.\n By default, if a given resource kind (e.g. Elasticsearch, Kibana, etc.) has more than 100 plans\n (which should be very rare, most likely caused by a bug) only 100 plans are returned for the given resource type:\n The first 10 plans, and the last 90 plans for that resource type.\n If ALL of the plans are desired, pass the `force_all_plan_history` parameter with a value of `true`.\n"
        required: false
        schema:
          type: boolean
          default: false
      - name: show_plan_defaults
        in: query
        description: If showing plans, whether to show values that are left at their default value (less readable but more informative)
        required: false
        schema:
          type: boolean
          default: false
      - name: convert_legacy_plans
        in: query
        description: If showing plans, whether to leave pre-2.0.0 plans in their legacy format (the default), or whether to update them to 2.0.x+ format (if 'true')
        required: false
        schema:
          type: boolean
          default: false
      - name: show_system_alerts
        in: query
        description: Number of system alerts (such as forced restarts due to memory limits) to be included in the response - can be large per cluster. Negative numbers or 0 will not return field.
        required: false
        schema:
          type: integer
          default: 0
      - name: show_settings
        in: query
        description: Whether to show cluster settings in the response.
        required: false
        schema:
          type: boolean
          default: false
      - name: show_instance_metrics
        in: query
        description: Whether to show resources instance metrics in the response.
        required: false
        schema:
          type: boolean
          default: true
      - name: show_instance_configurations
        in: query
        description: If true, will return details for each instance configuration referenced by the deployment.
        required: false
        schema:
          type: boolean
          default: true
      - name: enrich_with_template
        in: query
        description: If showing plans, whether to enrich the plan by including the missing elements from the deployment template it is based on
        required: false
        schema:
          type: boolean
          default: true
      - name: force_all_plan_history
        in: query
        description: "Force show the entire plan history no matter how long.\n As noted in the `show_plan_history` parameter description, by default, a maximum of 100 plans are shown per resource. \n If `true`, this parameter overrides the default, and ALL plans are returned.\n Use with care as the plan history can be VERY large. Consider pairing with `show_plan_logs=false`.\n "
        required: false
        schema:
          type: boolean
          default: false
      - name: clear_transient
        in: query
        description: If set (defaults to false) then removes the transient section from all child resources, making it safe to reapply via an update
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: The Deployment info response
          headers:
            x-cloud-resource-version:
              description: The resource version, which is used to avoid update conflicts with concurrent operations
              schema:
                type: string
            x-cloud-resource-created:
              description: The date-time when the resource was created (ISO format relative to UTC)
              schema:
                type: string
            x-cloud-resource-last-modified:
              description: The date-time when the resource was last modified (ISO format relative to UTC)
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentGetResponse'
        '401':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '404':
          description: 'The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.deployment_not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - CRUD
    put:
      tags:
      - Deployments
      summary: Update Deployment
      description: Updates a Deployment.
      operationId: update-deployment
      parameters:
      - name: deployment_id
        in: path
        description: Identifier for the Deployment
        required: true
        schema:
          type: string
      - name: hide_pruned_orphans
        in: query
        description: Whether or not to hide orphaned resources that were shut down (relevant if prune on the request is true)
        required: false
        schema:
          type: boolean
          default: false
      - name: skip_snapshot
        in: query
        description: Whether or not to skip snapshots before shutting down orphaned resources (relevant if prune on the request is true)
        required: false
        schema:
          type: boolean
          default: false
      - name: validate_only
        in: query
        description: If true, will just validate the Deployment definition but will not perform the update
        required: false
        schema:
          type: boolean
          default: false
      - name: version
        in: query
        description: If specified then checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: The request was valid and the deployment was updated.
          headers:
            x-cloud-resource-version:
              description: The resource version, which is used to avoid update conflicts with concurrent operations
              schema:
                type: string
            x-cloud-resource-created:
              description: The date-time when the resource was created (ISO format relative to UTC)
              schema:
                type: string
            x-cloud-resource-last-modified:
              description: The date-time when the resource was last modified (ISO format relative to UTC)
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentUpdateResponse'
        '400':
          description: The deployment request had errors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '401':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '404':
          description: 'The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.deployment_not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - CRUD
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeploymentUpdateRequest'
        description: The deployment definition
        required: true
    delete:
      tags:
      - Deployments
      summary: Delete Deployment
      description: Deletes a Deployment and all its resources.
      operationId: delete-deployment
      parameters:
      - name: deployment_id
        in: path
        description: Identifier for the Deployment
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The request was valid and the deployment was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentDeleteResponse'
        '400':
          description: The Deployment resources have not been shutdown yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '401':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '404':
          description: 'The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.deployment_not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - CRUD
  /deployments/{deployment_id}/_restore:
    post:
      tags:
      - Deployments
      summary: Restores a shutdown Deployment
      description: Restores all resources in a Deployment.
      operationId: restore-deployment
      parameters:
      - name: deployment_id
        in: path
        description: Identifier for the Deployment
        required: true
        schema:
          type: string
      - name: restore_snapshot
        in: query
        description: Whether or not to restore a snapshot for those resources that allow it.
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: The request was valid and the resources of the deployment were restored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentRestoreResponse'
        '400':
          description: There are Elasticsearch resources in the deployment which are not shut down.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '401':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '404':
          description: 'The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.deployment_not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - CRUD
  /deployments/{deployment_id}/_resync:
    post:
      tags:
      - Deployments
      summary: Resynchronize Deployment
      description: Immediately resynchronizes the search index for the selected deployment.
      operationId: resync-deployment
      parameters:
      - name: deployment_id
        in: path
        description: Identifier for the Deployment
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The deployment resync operation executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexSynchronizationResults'
        '500':
          description: 'The deployment resync operation failed for deployment {deployment_id}. (code: `deployments.resync_failed`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.resync_failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - resync
  /deployments/{deployment_id}/_shutdown:
    post:
      tags:
      - Deployments
      summary: Shuts down Deployment
      description: Shuts down all resources in a Deployment.
      operationId: shutdown-deployment
      parameters:
      - name: deployment_id
        in: path
        description: Identifier for the Deployment
        required: true
        schema:
          type: string
      - name: hide
        in: query
        description: Whether or not to hide the deployment and its resources.Only applicable for Platform administrators.
        required: false
        schema:
          type: boolean
      - name: skip_snapshot
        in: query
        description: Whether or not to skip snapshots before shutting down the resources
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: The request was valid and the resources of the deployment were shutdown.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentShutdownResponse'
        '400':
          description: 'Parameter is restricted and can only be set by a Platform administrator. (code: `deployments.restricted_parameter`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.restricted_parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '401':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '404':
          description: 'The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.deployment_not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - CRUD
  /deployments/{deployment_id}/apm/{ref_id}:
    get:
      tags:
      - Deployments
      summary: Get Deployment APM Resource Info
      description: Get info about an APM Resource belonging to a given Deployment.
      operationId: get-deployment-apm-resource-info
      parameters:
      - name: deployment_id
        in: path
        description: Identifier for the Deployment
        required: true
        schema:
          type: string
      - name: ref_id
        in: path
        description: User-specified RefId for the Resource (or '_main' if there is only one).
        required: true
        schema:
          type: string
      - name: show_metadata
        in: query
        description: Whether to include the full cluster metadata in the response - can be large per cluster and also include credentials.
        required: false
        schema:
          type: boolean
          default: false
      - name: show_plans
        in: query
        description: Whether to include the full current and pending plan information in the response - can be large per cluster.
        required: false
        schema:
          type: boolean
          default: true
      - name: show_plan_logs
        in: query
        description: Whether to include with the current and pending plan information the attempt log - can be very large per cluster.
        required: false
        schema:
          type: boolean
          default: false
      - name: show_plan_history
        in: query
        description: Whether to include with the current and pending plan information the plan history- can be very large per cluster.
        required: false
        schema:
          type: boolean
          default: false
      - name: show_plan_defaults
        in: query
        description: If showing plans, whether to show values that are left at their default value (less readable but more informative).
        required: false
        schema:
          type: boolean
          default: false
      - name: show_settings
        in: query
        description: Whether to show cluster settings in the response.
        required: false
        schema:
          type: boolean
          default: false
      - name: clear_transient
        in: query
        description: If set (defaults to false) then removes the transient section from all child resources, making it safe to reapply via an update
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: Standard response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApmResourceInfo'
        '404':
          description: 'The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.deployment_not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '500':
          description: 'We have failed you. (code: `deployments.deployment_resource_no_longer_exists`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.deployment_resource_no_longer_exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: Deployment - Info
  /deployments/{deployment_id}/apm/{ref_id}/_reset-token:
    post:
      tags:
      - Deployments
      summary: Reset the secret token for an APM resource.
      description: Reset the token of an APM resource.
      operationId: deployment-apm-reset-secret-token
      parameters:
      - name: deployment_id
        in: path
        description: Identifier for the Deployment.
        required: true
        schema:
          type: string
      - name: ref_id
        in: path
        description: User-specified RefId for the Resource (or '_main' if there is only one).
        required: true
        schema:
          type: string
      responses:
        '202':
          description: Response containing the new secret token, plan to apply it starts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApmCrudResponse'
        '400':
          description: 'Reset token is not supported when APM is managed by Elastic Agent. (code: `clusters.cluster_plan_state_error`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - clusters.cluster_plan_state_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '404':
          description: '* 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:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.deployment_not_found
                - deployments.deployment_resource_not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
        '500':
          description: 'We have failed you. (code: `deployments.deployment_resource_no_longer_exists`)'
          headers:
            x-cloud-error-codes:
              description: The error codes associated with the response
              schema:
                type: string
                enum:
                - deployments.deployment_resource_no_longer_exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicFailedReply'
      x-doc:
        tag: APM routes
  /deployments/{deployment_id}/appsearch/{ref_id}:
    get:
      tags:
      - Deployments
      summary: Get Deploym

# --- truncated at 32 KB (432 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/openapi/elk-stack-deployments-api-openapi.yml