# Delete ACLs

Deletes ACL rules that match the provided filters. Supports dry-run mode and bulk deletion.

Requires admin permissions.

## Request

{% code overflow="wrap" %}

```bash
curl https://api.warpstream.com/api/v1/virtual_clusters/acls/delete \
-H 'warpstream-api-key: XXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
  "virtual_cluster_id": "vci_1d4930d7_8e6d_4ad9_b27a_654ed4aaa3ee",
  "acls": [
    {
      "resource_type": "TOPIC",
      "resource_name": "orders",
      "pattern_type": "LITERAL",
      "principal": "User:alice",
      "host": "*",
      "operation": "READ",
      "permission_type": "ALLOW"
    }
  ]
}'
```

{% endcode %}

Each filter in the `acls` array requires all fields: `resource_type`, `resource_name`, `pattern_type`, `principal`, `host`, `operation`, and `permission_type`.

## Response

The response contains the ACL rules that were deleted:

```json
{
  "acls": [
    {
      "resource_type": "TOPIC",
      "resource_name": "orders",
      "pattern_type": "LITERAL",
      "principal": "User:alice",
      "host": "*",
      "operation": "READ",
      "permission_type": "ALLOW"
    }
  ]
}
```

## Dry Run

Set `dry_run` to `true` to preview which ACLs would be deleted without actually removing them:

{% code overflow="wrap" %}

```bash
curl https://api.warpstream.com/api/v1/virtual_clusters/acls/delete \
-H 'warpstream-api-key: XXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
  "virtual_cluster_id": "vci_1d4930d7_8e6d_4ad9_b27a_654ed4aaa3ee",
  "dry_run": true,
  "acls": [
    {
      "resource_type": "TOPIC",
      "resource_name": "orders",
      "pattern_type": "LITERAL",
      "principal": "User:alice",
      "host": "*",
      "operation": "READ",
      "permission_type": "ALLOW"
    }
  ]
}'
```

{% endcode %}

## Bulk Deletion

Set `bulk_deletion` to `true` to delete all ACLs matching broad criteria. In bulk mode, you filter only by `resource_type`, `pattern_type`, `operation`, and `permission_type`. The fields `resource_name`, `host`, and `principal` must be omitted (or empty).

{% code overflow="wrap" %}

```bash
curl https://api.warpstream.com/api/v1/virtual_clusters/acls/delete \
-H 'warpstream-api-key: XXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
  "virtual_cluster_id": "vci_1d4930d7_8e6d_4ad9_b27a_654ed4aaa3ee",
  "bulk_deletion": true,
  "acls": [
    {
      "resource_type": "TOPIC",
      "pattern_type": "LITERAL",
      "operation": "READ",
      "permission_type": "ALLOW"
    }
  ]
}'
```

{% endcode %}

{% hint style="warning" %}
Bulk deletion can remove many ACLs at once. Use `dry_run` first to verify which ACLs will be affected.
{% endhint %}
