---
type: api
title: List Deployments
description: List Deployments.
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/cloud-enterprise/v4/operation/operation-list-deployments
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/cloud-enterprise/v4/operation/operation-list-deployments
products:
  - Elastic Cloud Enterprise
---

# List Deployments

Authentication: required

## Paths

- `GET` `/deployments`

## Description

List Deployments.

## Responses

#### `200`

The list of deployments that belong to the authenticated user.

`application/json`

- `deployments` (object[])
  The deployments
  - `id` (string)
    The id of this deployment
  - `name` (string)
    The name of this deployment
  - `resources` (object[])
    List of resources in this deployment
    - `ref_id` (string)
      A locally-unique friendly alias for this Elasticsearch cluster
    - `elasticsearch_cluster_ref_id` (string)
      The Elasticsearch cluster that this resource depends on.
    - `id` (string)
      A system-unique id for the created resource
    - `kind` (string)
      The kind of resource
    - `region` (string)
      Identifier of the region in which this resource runs.
    - `cloud_id` (string)
      An encoded string that provides other Elastic services with the necessary information to connect to this Elasticsearch and Kibana
    - `credentials` (object)
      The username and password for the new Elasticsearch cluster, which is returned from the Elasticsearch cluster `create` command.
      - `username` (string)
        The username of the newly created cluster
      - `password` (string)
        The password of the newly created cluster
    - `secret_token` (string)
      Secret token for using a created resource. Only provided on initial create and absent otherwise.
    - `warnings` (object[])
      List of warnings generated from validating resource updates
      - `code` (string)
        A structured code representing the error type that occurred
      - `message` (string)
        A human readable message describing the warning that occurred
#### `401`

You are not authorized to perform this action.

`application/json`

- `errors` (object[])
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` (string[])
    If the error can be tied to a specific field or fields in the user request, this lists those fields
## Code examples

#### curl

```curl
curl -X GET "${API_URL}/deployments" \
  -u "${USERNAME}:${PASSWORD}"
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "deployments": [
    {
      "id": "string",
      "name": "string",
      "resources": [
        {
          "ref_id": "string",
          "elasticsearch_cluster_ref_id": "string",
          "id": "string",
          "kind": "string",
          "region": "string",
          "cloud_id": "string",
          "credentials": {
            "username": "string",
            "password": "string"
          },
          "secret_token": "string",
          "warnings": []
        }
      ]
    }
  ]
}
```

#### 401

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
```

