---
type: api
title: Delete ruleset association
description: Deletes the traffic rules in the ruleset from the deployment.
url: https://www.elastic.co/docs/api/doc/cloud-enterprise/v3/operation/operation-delete-traffic-filter-ruleset-association
resource: https://www.elastic.co/docs/api/doc/cloud-enterprise/v3/operation/operation-delete-traffic-filter-ruleset-association
products:
  - Elastic Cloud Enterprise
---

# Delete ruleset association

Authentication: required

## Paths

- `DELETE` `/deployments/traffic-filter/rulesets/{ruleset_id}/associations/{association_type}/{associated_entity_id}`

#### Path parameters

- `ruleset_id` (string) — required
  The mandatory ruleset ID.
- `association_type` (string) — required
  Association type
- `associated_entity_id` (string) — required
  Associated entity ID

## Description

Deletes the traffic rules in the ruleset from the deployment.

## Responses

#### `200`

Delete association request was valid and the association has been deleted

`application/json`

Type: `object`

#### `404`

The traffic filter ruleset association cannot be found. (code: `traffic_filter.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

#### `500`

Deletion failed. (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 DELETE "${API_URL}/deployments/traffic-filter/rulesets/${RULESET_ID}/associations/${ASSOCIATION_TYPE}/${ASSOCIATED_ENTITY_ID}" \
  -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
{}
```

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

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

