For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/api/latest/feature-flags/list-feature-flags.md. A documentation index is available at /llms.txt.
Language
Datadog site

List feature flags

GEThttps://api.datadoghq.com/api/v2/feature-flagshttps://api.us3.datadoghq.com/api/v2/feature-flagshttps://api.us5.datadoghq.com/api/v2/feature-flagshttps://api.datadoghq.eu/api/v2/feature-flagshttps://api.ap1.datadoghq.com/api/v2/feature-flagshttps://api.ap2.datadoghq.com/api/v2/feature-flagshttps://api.uk1.datadoghq.com/api/v2/feature-flagshttps://api.ddog-gov.com/api/v2/feature-flagshttps://api.us2.ddog-gov.com/api/v2/feature-flags

Overview

Returns a paginated list of feature flags for the organization. Supports filtering by key, tags, teams, SDK availability, production status, and other flag properties. Use page[limit] and page[offset] to paginate, or follow the next link in the response.

This endpoint requires all of the following permissions:

  • feature_flag_config_read
  • feature_flag_environment_config_read

OAuth apps require the feature_flag_config_read, feature_flag_environment_config_read authorization scope to access this endpoint.

Arguments

Query Strings

Name
Type
Description
key
string

Filter feature flags by an exact, case-sensitive key. Use search for partial matching.

is_archived
boolean

Filter by archived status. If true, return only archived flags. If false, return only flags that are not archived. If omitted, return both.

limit
integer

Deprecated alias for page[limit]. Use page[limit] for new requests. Used only when page[limit] is absent. When both parameters are omitted, the server defaults to 25. Values that exceed 50 are set to 50; non-positive or empty values use the server default.

Default: 100
offset
integer

Deprecated alias for page[offset]. Used only when page[offset] is absent. Defaults to 0. Negative or empty values are set to 0.

Default: 0
tags
array

Filter by exact tag values using repeated parameters, such as tags=env:prod&tags=purpose:sitemap. A flag must have all ordinary tags. Values of the form team:<handle> match any selected team and are combined with teams into one set. The result must match all ordinary tags, any selected team, and all other filters. Empty values are ignored.

teams
array

Filter by team handles without the team: prefix. Use repeated parameters to filter by multiple team handles, such as teams=checkout&teams=payments. A flag must belong to at least one selected team. Team handles from teams and team:<handle> values from tags are treated as a single set and combined with ordinary tags and other filters using AND logic. Duplicate handles do not duplicate results. Unknown handles do not match any flags. Empty handles, surrounding white space, or using the team: prefix return a bad request error. Response tags are unchanged.

production_status
array

Filter by status across production environments. Use repeated parameters to match any selected status. ENABLED matches at least one enabled production environment without a variant override. OVERRIDDEN matches at least one enabled production environment with a variant override. DISABLED matches flags whose associated production environments are all disabled. A flag can match both ENABLED and OVERRIDDEN in different environments. Flags without associated production environments do not match. This does not filter by a specific environment. Unknown values do not match any status.

distribution_channel
enum

Filter by SDK availability. CLIENT returns flags with channel CLIENT or ALL. SERVER returns flags with channel SERVER or ALL. ALL, an empty value, or omission applies no channel restriction; it does not select only flags whose channel is ALL. Values are case-insensitive and surrounding white space is ignored. Invalid values return a bad request error.

Allowed enum values: ALL, CLIENT, SERVER
search
string

Case-insensitive substring search on flag names, keys, and tag names. Combined with all other filters. An empty value applies no search restriction.

value_type
array

Filter by variant value types using repeated parameters. A flag must match at least one selected type. Empty values are ignored. Invalid types return a bad request error.

created_by
array

Filter by creator UUIDs using repeated parameters. A flag must match at least one creator. Empty values are ignored. Invalid UUIDs return a bad request error.

flag_ids
array

Filter by feature flag UUIDs using repeated parameters. A flag must match at least one ID and all other filters. Duplicate IDs return each flag once. Unknown IDs and IDs from other organizations do not match any flags. Empty or invalid UUIDs return a bad request error. Pagination still applies.

staleness_status
enum

Filter by the computed staleness status: ACTIVE, STALE, or PERMANENT. Values are case-insensitive and surrounding white space is ignored. An empty value or omission applies no restriction. Invalid values return a bad request error. Read the computed result from staleness_details.staleness_status, not the legacy staleness_status response field.

Allowed enum values: ACTIVE, STALE, PERMANENT
saved_filter_id
string

Filter to flags that reference this saved filter in their targeting conditions. An empty value or omission applies no restriction. An invalid UUID returns a bad request error.

sort
string

Sort by name, updated_at, created_at, or evaluations. Use a comma-separated list for multiple sort fields and prefix a field with - for descending order. The default is updated_at descending. When favorites are enabled, the authenticated user's favorite flags take precedence over the selected ordering. Unknown fields return a bad request error.

page[limit]
integer

Maximum number of flags to return. Defaults to 25 and is capped at 50. Values that exceed 50 are set to 50. Non-positive or empty values use the default. A non-integer value returns a bad request error. Takes precedence over limit when both are present. Pagination applies even when no pagination parameters are supplied.

Default: 25
page[offset]
integer

Number of matching flags to skip before returning results. Defaults to 0. Negative or empty values are set to 0. A non-integer value returns a bad request error. Takes precedence over offset when both are present.

Default: 0

Response

OK

Response containing a list of feature flags.

Field
Type
Description
data [required]
[object]

List of feature flags.

links
object

Pagination links. Follow next with the same authentication to retrieve the next page. Links use page[limit] and page[offset] and preserve the filters. Navigation links are omitted when not applicable.

meta
object

Pagination metadata for feature flags.

Code Example

List feature flags
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# 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" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"