Get a saved filter
https://api.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id}https://api.us3.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id}https://api.us5.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id}https://api.datadoghq.eu/api/v2/feature-flags/saved-filters/{saved_filter_id}https://api.ap1.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id}https://api.ap2.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id}https://api.uk1.datadoghq.com/api/v2/feature-flags/saved-filters/{saved_filter_id}https://api.ddog-gov.com/api/v2/feature-flags/saved-filters/{saved_filter_id}https://api.us2.ddog-gov.com/api/v2/feature-flags/saved-filters/{saved_filter_id}概要
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.
OAuth apps require the feature_flag_config_read authorization scope to access this endpoint.
引数
パスパラメーター
saved_filter_id [required]The ID of the saved filter.
応答
OK
Response containing a saved filter and its targeting rules.
data [required]A saved filter resource.
attributes [required]Saved filter details, including the full targeting rules and conditions.
archived_atThe time the saved filter was archived. Omitted when the filter is not archived.
created_at [required]The time the saved filter was created.
created_by [required]The ID of the user who created the saved filter.
creation_type [required]How the saved filter was authored. RULES indicates rule-based authoring and LIST indicates list import. Both types return targeting rules and conditions.
RULES, LISTdescriptionA description of the saved filter. Omitted when no description is set.
migration_metadataOptional JSON metadata supplied by migration tools for tracking the source of a saved filter.
name [required]The name of the saved filter.
targeting_rules [required]Targeting rules combined with OR. Conditions within each rule are combined with AND. Both saved lists and saved rules use this structure.
conditions [required]Conditions combined with AND within this targeting rule.
attribute [required]The attribute evaluated by the condition.
id [required]The ID of the condition.
operator [required]The comparison operator used by a saved filter condition.
LT, LTE, GT, GTE, MATCHES, NOT_MATCHES, ONE_OF, NOT_ONE_OF, IS_NULL, EQUALSShow 6 more
SEMVER_EQ, SEMVER_NEQ, SEMVER_LT, SEMVER_LTE, SEMVER_GT, SEMVER_GTEvalue [required]Values used by the condition operator.
id [required]The ID of the targeting rule.
updated_at [required]The time the saved filter was last updated.
id [required]The ID of the saved filter.
type [required]The saved filter resource type.
saved-filters{
"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"
}
}Bad Request
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Forbidden
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Not Found
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}コード例
# Path parameters
export saved_filter_id="550e8400-e29b-41d4-a716-446655440090"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.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/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export saved_filter_id="550e8400-e29b-41d4-a716-446655440090"
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.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/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export saved_filter_id="550e8400-e29b-41d4-a716-446655440090"
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.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/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export saved_filter_id="550e8400-e29b-41d4-a716-446655440090"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# 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/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export saved_filter_id="550e8400-e29b-41d4-a716-446655440090"
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.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/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export saved_filter_id="550e8400-e29b-41d4-a716-446655440090"
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.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/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export saved_filter_id="550e8400-e29b-41d4-a716-446655440090"
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.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/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export saved_filter_id="550e8400-e29b-41d4-a716-446655440090"
# Set your Datadog site and credentials
export DD_SITE="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/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export saved_filter_id="550e8400-e29b-41d4-a716-446655440090"
# Set your Datadog site and credentials
export DD_SITE="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/feature-flags/saved-filters/${saved_filter_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"