---
type: api
title: Get associated deployments
description: Retrieves a list of deployments that are associated to the specified ruleset.
url: https://www.elastic.co/docs/api/doc/cloud-enterprise/v4/operation/operation-get-traffic-filter-ruleset-deployment-associations
resource: https://www.elastic.co/docs/api/doc/cloud-enterprise/v4/operation/operation-get-traffic-filter-ruleset-deployment-associations
products:
  - Elastic Cloud Enterprise
---

# Get associated deployments

Authentication: required

## Paths

- `GET` `/deployments/traffic-filter/rulesets/{ruleset_id}/associations`

#### Path parameters

- `ruleset_id` (string) — required
  The mandatory ruleset ID.

## Description

Retrieves a list of deployments that are associated to the specified ruleset.

## Responses

#### `200`

Associations referred by traffic filter rulesets were successfully returned

`application/json`

- `associations` (object[])
  List of associations
  - `entity_type` (string)
    Type of the traffic filter ruleset association, such as 'deployment', 'cluster'
  - `id` (string)
    ID of the entity, such as the deployment ID or Elasticsearch cluster ID.
- `total_associations` (integer · format: int32)
  Total number of associations. This includes associations the user does not have permission to view.
#### `500`

Error fetching deployments. (code: `traffic_filter.request_execution_failed`)

`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/traffic-filter/rulesets/${RULESET_ID}/associations" \
  -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
{
  "associations": [
    {
      "entity_type": "string",
      "id": "string"
    }
  ],
  "total_associations": 0
}
```

#### 500

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

