GET https://api.ap1.datadoghq.com/api/v2/rum/applications/{app_id}/hardcoded_retention_filtershttps://api.ap2.datadoghq.com/api/v2/rum/applications/{app_id}/hardcoded_retention_filtershttps://api.datadoghq.eu/api/v2/rum/applications/{app_id}/hardcoded_retention_filtershttps://api.ddog-gov.com/api/v2/rum/applications/{app_id}/hardcoded_retention_filtershttps://api.us2.ddog-gov.com/api/v2/rum/applications/{app_id}/hardcoded_retention_filtershttps://api.datadoghq.com/api/v2/rum/applications/{app_id}/hardcoded_retention_filtershttps://api.us3.datadoghq.com/api/v2/rum/applications/{app_id}/hardcoded_retention_filtershttps://api.us5.datadoghq.com/api/v2/rum/applications/{app_id}/hardcoded_retention_filters
Overview
Get the list of hardcoded retention filters for a RUM application.
Arguments
Path Parameters
Response
OK
All hardcoded retention filters for a RUM application.
Expand All
A list of hardcoded retention filters.
The attributes of a hardcoded retention filter.
Cross-product retention settings for a hardcoded retention filter.
Indicates whether Session Replay cross-product retention is active.
session_replay_sample_rate
Percentage (0–100) of retained sessions with an ingested replay whose replay data is kept.
Indicates whether Trace cross-product retention is active.
Percentage (0–100) of retained sessions with ingested traces whose traces are indexed.
cross_product_sampling_editability
Flags indicating which cross_product_sampling fields can be updated. Read-only.
session_replay_sample_rate
If true, cross_product_sampling.session_replay_sample_rate can be updated on this filter.
If true, cross_product_sampling.trace_sample_rate can be updated on this filter.
Indicates whether the hardcoded retention filter is active. Read-only.
The type of RUM events the hardcoded filter applies to. Read-only.
Allowed enum values: session,view,action,error,resource,long_task,vital
The name of the hardcoded retention filter. Read-only.
The query string for the hardcoded retention filter. Read-only.
The retention sample rate (0–100) for the hardcoded filter. Read-only.
The ID of the hardcoded retention filter.
Metadata about the hardcoded retention filter.
The source of the last update to a hardcoded retention filter.
Allowed enum values: default,ui,terraform
Unix epoch (in milliseconds) of the last update.
Handle of the user who last updated the filter.
The resource type. The value must be hardcoded_retention_filters.
Allowed enum values: hardcoded_retention_filters
default: hardcoded_retention_filters
{
"data": [
{
"attributes": {
"cross_product_sampling": {
"session_replay_enabled": true,
"session_replay_sample_rate": 50,
"trace_enabled": true,
"trace_sample_rate": 25
},
"cross_product_sampling_editability": {
"session_replay_sample_rate": true,
"trace_sample_rate": false
},
"enabled": true,
"event_type": "session",
"name": "Replay sessions",
"query": "@session.has_replay:true",
"sample_rate": 100
},
"id": "forced_replay_sessions",
"meta": {
"source": "ui",
"updated_at": 1735689600000,
"updated_by_handle": "jane.doe@example.com"
},
"type": "hardcoded_retention_filters"
}
]
}
Not Authorized
{
"errors": [
"Bad Request"
]
}
Too many requests
{
"errors": [
"Bad Request"
]
}
Code Example
# Path parameters
export app_id="CHANGE_ME"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/rum/applications/${app_id}/hardcoded_retention_filters" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"