---
type: api
title: Get the tags for a Deployment
description: Returns the tags for a Deployment.
url: https://www.elastic.co/docs/api/doc/cloud-enterprise/operation/operation-get-deployment-tags
resource: https://www.elastic.co/docs/api/doc/cloud-enterprise/operation/operation-get-deployment-tags
products:
  - Elastic Cloud Enterprise
---

# Get the tags for a Deployment

Authentication: required

## Paths

- `GET` `/deployments/{deployment_id}/tags`

#### Path parameters

- `deployment_id` (string) — required
  Identifier for the Deployment

## Description

Returns the tags for a Deployment.

## Responses

#### `200`

The deployment tags were successfully returned

`application/json`

- `tags` (object[])
  Arbitrary user-defined metadata associated with this deployment
  - `key` (string)
    The metadata field name
  - `value` (string)
    The metadata value
#### `404`

The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)

`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
##### Response headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code examples

#### curl

```curl
curl -X GET "${API_URL}/deployments/${DEPLOYMENT_ID}/tags" \
  -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
{
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}
```

#### 404

`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"
      ]
    }
  ]
}
```

