---
title: Get a saved filter
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Feature Flags
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Get a saved filter{% #get-a-saved-filter %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                           |
| ----------------- | -------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/feature-flags/saved-filters/{saved_filter_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/feature-flags/saved-filters/{saved_filter_id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/feature-flags/saved-filters/{saved_filter_id}  |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id} |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id} |

### Overview

Returns a saved filter by ID, including its full targeting rules, conditions, and values. Supports both saved lists and saved rules. Targeting rules are combined with OR, and conditions within each rule are combined with AND. Returns the stored filter definition rather than evaluating it against users or organizations. Archived filters can be retrieved. Filters that are deleted or belong to another organization return a not found error. This endpoint requires the `feature_flag_config_read` permission.

OAuth apps require the `feature_flag_config_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#feature-flags) to access this endpoint.



### Arguments

#### Path Parameters

| Name                              | Type   | Description                 |
| --------------------------------- | ------ | --------------------------- |
| saved_filter_id [*required*] | string | The ID of the saved filter. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a saved filter and its targeting rules.

| Parent field    | Field                             | Type      | Description                                                                                                                                                                                 |
| --------------- | --------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                 | data [*required*]            | object    | A saved filter resource.                                                                                                                                                                    |
| data            | attributes [*required*]      | object    | Saved filter details, including the full targeting rules and conditions.                                                                                                                    |
| attributes      | archived_at                       | date-time | The time the saved filter was archived. Omitted when the filter is not archived.                                                                                                            |
| attributes      | created_at [*required*]      | date-time | The time the saved filter was created.                                                                                                                                                      |
| attributes      | created_by [*required*]      | string    | The ID of the user who created the saved filter.                                                                                                                                            |
| attributes      | creation_type [*required*]   | enum      | How the saved filter was authored. RULES indicates rule-based authoring and LIST indicates list import. Both types return targeting rules and conditions. Allowed enum values: `RULES,LIST` |
| attributes      | description                       | string    | A description of the saved filter. Omitted when no description is set.                                                                                                                      |
| attributes      | migration_metadata                |           | Optional JSON metadata supplied by migration tools for tracking the source of a saved filter.                                                                                               |
| attributes      | name [*required*]            | string    | The name of the saved filter.                                                                                                                                                               |
| attributes      | targeting_rules [*required*] | [object]  | Targeting rules combined with OR. Conditions within each rule are combined with AND. Both saved lists and saved rules use this structure.                                                   |
| targeting_rules | conditions [*required*]      | [object]  | Conditions combined with AND within this targeting rule.                                                                                                                                    |
| conditions      | attribute [*required*]       | string    | The attribute evaluated by the condition.                                                                                                                                                   |
| conditions      | id [*required*]              | uuid      | The ID of the condition.                                                                                                                                                                    |
| conditions      | operator [*required*]        | enum      | The comparison operator used by a saved filter condition. Allowed enum values: `LT,LTE,GT,GTE,MATCHES,NOT_MATCHES,ONE_OF,NOT_ONE_OF,IS_NULL,EQUALS`                                         |
| conditions      | value [*required*]           | [string]  | Values used by the condition operator.                                                                                                                                                      |
| targeting_rules | id [*required*]              | uuid      | The ID of the targeting rule.                                                                                                                                                               |
| attributes      | updated_at [*required*]      | date-time | The time the saved filter was last updated.                                                                                                                                                 |
| data            | id [*required*]              | uuid      | The ID of the saved filter.                                                                                                                                                                 |
| data            | type [*required*]            | enum      | The saved filter resource type. Allowed enum values: `saved-filters`                                                                                                                        |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "archived_at": "2026-01-03T12:00:00Z",
      "created_at": "2026-01-01T12:00:00Z",
      "created_by": "550e8400-e29b-41d4-a716-446655440091",
      "creation_type": "RULES",
      "description": "Users selected by email address or organization ID.",
      "migration_metadata": {
        "provider": "launchdarkly",
        "segment_key": "early-access-users"
      },
      "name": "Early access users",
      "targeting_rules": [
        {
          "conditions": [
            {
              "attribute": "email",
              "id": "550e8400-e29b-41d4-a716-446655440093",
              "operator": "ONE_OF",
              "value": [
                "user@example.com"
              ]
            }
          ],
          "id": "550e8400-e29b-41d4-a716-446655440092"
        }
      ],
      "updated_at": "2026-01-02T12:00:00Z"
    },
    "id": "550e8400-e29b-41d4-a716-446655440090",
    "type": "saved-filters"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="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 title="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 %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="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 title="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 %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parameters export saved_filter_id="550e8400-e29b-41d4-a716-446655440090" \# Use a Personal Access Token or Service Access Token export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"  \# Curl command curl -X GET "https://api.datadoghq.com/api/v2/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" 

                
{% /tab %}
