---
title: List tag indexing rule exemptions
description: Returns explicit exemptions and legacy tag configurations that exclude metrics from tag indexing rules.
breadcrumbs: Docs > API > List tag indexing rule exemptions
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/llms.txt).

# List tag indexing rule exemptions

## v2 (latest)

{% alert level="warning" %}
**Note**: The Tag Indexing Rules feature is currently in Preview.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                                       |
| ----------------- | ---------------------------------------------------------------------------------- |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/metrics/list-tag-indexing-rule-exemptions     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/metrics/list-tag-indexing-rule-exemptions |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/metrics/list-tag-indexing-rule-exemptions |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/metrics/list-tag-indexing-rule-exemptions      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/metrics/list-tag-indexing-rule-exemptions |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/metrics/list-tag-indexing-rule-exemptions |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/metrics/list-tag-indexing-rule-exemptions |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/metrics/list-tag-indexing-rule-exemptions      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/metrics/list-tag-indexing-rule-exemptions  |

### Overview

Returns explicit exemptions and legacy tag configurations that exclude metrics from tag indexing rules.
You can filter results by metric name prefix, whether an exemption is safe to remove, or the UUID of a matching
tag indexing rule. You can sort results by metric name or by estimated change in indexed volume.

This endpoint requires the `metrics_read` permission.

OAuth apps require the `metrics_read` authorization [scope](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/scopes.md#metrics) to access this endpoint.

### Arguments

#### Query Strings

| Field                        | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| filter[metric_prefix]        | string  | Filter exemptions to metrics whose names start with this literal prefix. Matching is case-sensitive. Wildcard characters are treated literally.                                                                                                                                                                                                                                                                                   |
| filter[safe]                 | boolean | Filter exemptions by whether they are safe to remove. An exemption is considered safe when a fresh, usable estimate indicates that removing it would not increase indexed volume and would not drop tags used to query the metric in monitors, dashboards, notebooks, or SLOs. Set to `true` to return safe-to-remove exemptions, or `false` to return all other exemptions, including those with unavailable or stale estimates. |
| filter[tag_indexing_rule_id] | string  | Filter exemptions to metrics matched by the tag indexing rule with this UUID.                                                                                                                                                                                                                                                                                                                                                     |
| sort                         | enum    | Sort field. Prefix the field with `-` for descending order. The default is `estimated_change_in_volume` in ascending order, with the largest reductions (most negative values) first. Allowed enum values: `name`, `-name`, `estimated_change_in_volume`, `-estimated_change_in_volume`. Default: `estimated_change_in_volume`.                                                                                                   |
| page[size]                   | integer | Maximum number of results per page. Defaults to 10000; accepts values from 1 to 10000. If `meta.pagination.next_cursor` is non-null, request the next page by passing that value as `page[cursor]`. Continue until `next_cursor` is null. Default: `10000`.                                                                                                                                                                       |
| page[cursor]                 | string  | Cursor for pagination. Use `page[size]` to opt-in to pagination and get the first page; for subsequent pages, use the value from `meta.pagination.next_cursor` in the response. Pagination is complete when `next_cursor` is null.                                                                                                                                                                                                |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response containing a page of tag indexing rule exemptions.

| Parent field | Field                      | Type      | Description                                                                                                                                                                                                                                                                                                                                                                             |
| ------------ | -------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data                       | [object]  | Array of tag indexing rule exemption objects.                                                                                                                                                                                                                                                                                                                                           |
| data         | attributes                 | object    | Attributes of a tag indexing rule exemption.                                                                                                                                                                                                                                                                                                                                            |
| attributes   | created_at                 | date-time | Timestamp when the exemption was created. Read-only.                                                                                                                                                                                                                                                                                                                                    |
| attributes   | created_by_handle          | string    | Handle of the user who created the exemption. Read-only.                                                                                                                                                                                                                                                                                                                                |
| attributes   | estimated_change_in_volume | int64     | Estimated change in indexed cardinality or points if the exemption is removed and the matching tag indexing rule applies to the metric. A negative value indicates a reduction in indexed volume, a positive value indicates an increase, and zero indicates no change. A `null` value indicates that the estimate is unavailable. Read-only.                                           |
| attributes   | kind                       | string    | Discriminates between an explicit exemption (`exemption`) and a pre-existing legacy tag configuration acting as an implicit exclusion (`legacy_tag_configuration`).                                                                                                                                                                                                                     |
| attributes   | missing_indexed_tags       | [string]  | Tag keys used to query this metric in monitors, dashboards, notebooks, and SLOs that the matching rule would remove or not include if the exemption is removed. Read-only.                                                                                                                                                                                                              |
| attributes   | reason                     | string    | The reason the metric is exempt from tag indexing rules.                                                                                                                                                                                                                                                                                                                                |
| attributes   | volume_status              | enum      | Indicates whether `estimated_change_in_volume` is available and, if not, why. `ok` indicates a fresh estimate. `unindexed_tags` indicates that the matching rule uses tags that are not indexed for the metric. `unavailable` indicates that the estimate is stale, was not computed, or could not be retrieved. Read-only. Allowed enum values: `ok`, `unindexed_tags`, `unavailable`. |
| data         | id                         | string    | The metric name, used as the resource ID.                                                                                                                                                                                                                                                                                                                                               |
| data         | type                       | enum      | The tag indexing rule exemption resource type. Allowed enum values: `tag_indexing_rule_exemptions`. Default: `tag_indexing_rule_exemptions`.                                                                                                                                                                                                                                            |
|              | links                      | object    | Pagination links. Only present if pagination query parameters were provided.                                                                                                                                                                                                                                                                                                            |
| links        | first                      | string    | Link to the first page.                                                                                                                                                                                                                                                                                                                                                                 |
| links        | last                       | string    | Link to the last page.                                                                                                                                                                                                                                                                                                                                                                  |
| links        | next                       | string    | Link to the next page.                                                                                                                                                                                                                                                                                                                                                                  |
| links        | prev                       | string    | Link to previous page.                                                                                                                                                                                                                                                                                                                                                                  |
| links        | self                       | string    | Link to current page.                                                                                                                                                                                                                                                                                                                                                                   |
|              | meta                       | object    | Response metadata object.                                                                                                                                                                                                                                                                                                                                                               |
| meta         | pagination                 | object    | Paging attributes. Only present if pagination query parameters were provided.                                                                                                                                                                                                                                                                                                           |
| pagination   | cursor                     | string    | The cursor used to get the current results, if any.                                                                                                                                                                                                                                                                                                                                     |
| pagination   | limit                      | int32     | Number of results returned                                                                                                                                                                                                                                                                                                                                                              |
| pagination   | next_cursor                | string    | The cursor used to get the next results, if any.                                                                                                                                                                                                                                                                                                                                        |
| pagination   | type                       | enum      | Type of metric pagination. Allowed enum values: `cursor_limit`. Default: `cursor_limit`.                                                                                                                                                                                                                                                                                                |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": [
    {
      "attributes": {
        "created_at": "2024-01-15T12:00:00.000Z",
        "created_by_handle": "user@datadoghq.com",
        "estimated_change_in_volume": 45,
        "kind": "exemption",
        "missing_indexed_tags": [
          "service"
        ],
        "reason": "This metric has a pre-existing tag configuration.",
        "volume_status": "unavailable"
      },
      "id": "dd.test.metric",
      "type": "tag_indexing_rule_exemptions"
    }
  ],
  "links": {
    "first": "string",
    "last": "string",
    "next": "string",
    "prev": "string",
    "self": "string"
  },
  "meta": {
    "pagination": {
      "cursor": "string",
      "limit": "integer",
      "next_cursor": "string",
      "type": "cursor_limit"
    }
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too Many Requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/metrics/list-tag-indexing-rule-exemptions" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
