For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ja/api/latest/rum-retention-filters/update-a-permanent-rum-retention-filter.md. A documentation index is available at /llms.txt.
Language
Datadog site

Update a permanent RUM retention filter

PATCHhttps://api.datadoghq.com/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}https://api.us3.datadoghq.com/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}https://api.us5.datadoghq.com/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}https://api.datadoghq.eu/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}https://api.ap1.datadoghq.com/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}https://api.ap2.datadoghq.com/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}https://api.uk1.datadoghq.com/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}https://api.ddog-gov.com/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}https://api.us2.ddog-gov.com/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}

概要

Update the cross-product sampling configuration of a permanent RUM retention filter for a RUM application. Only fields marked as editable in the editability block of the filter can be updated. Updating a non-editable field returns a 400 response.

引数

パスパラメーター

名前
タイプ
説明
app_id [required]
string

RUM application ID.

permanent_rf_id [required]
enum

The identifier of the permanent RUM retention filter.

Allowed enum values: rum_apm_flat_sampling, synthetics_sessions, forced_replay_sessions

リクエスト

Body Data (required)

New configuration of the permanent RUM retention filter.

フィールド
タイプ
説明
data [required]
object

The new permanent RUM retention filter configuration to update.

応答

Updated

A permanent RUM retention filter object.

フィールド
タイプ
説明
data
object

A permanent RUM retention filter.

コード例

Update a permanent RUM retention filter
# Path parameters
export app_id="CHANGE_ME"
export permanent_rf_id="synthetics_sessions"

# 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 PATCH "https://api.${DD_SITE}/api/v2/rum/applications/${app_id}/retention_filters/permanent/${permanent_rf_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "cross_product_sampling": {
        "trace_enabled": true,
        "trace_sample_rate": 50
      }
    },
    "id": "synthetics_sessions",
    "type": "permanent_retention_filters"
  }
}
EOF
# Path parameters
export app_id="CHANGE_ME"
export permanent_rf_id="synthetics_sessions"

# 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 PATCH "https://api.${DD_SITE}/api/v2/rum/applications/${app_id}/retention_filters/permanent/${permanent_rf_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "cross_product_sampling": {
        "trace_enabled": true,
        "trace_sample_rate": 50
      }
    },
    "id": "synthetics_sessions",
    "type": "permanent_retention_filters"
  }
}
EOF
# Path parameters
export app_id="CHANGE_ME"
export permanent_rf_id="synthetics_sessions"

# 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 PATCH "https://api.${DD_SITE}/api/v2/rum/applications/${app_id}/retention_filters/permanent/${permanent_rf_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "cross_product_sampling": {
        "trace_enabled": true,
        "trace_sample_rate": 50
      }
    },
    "id": "synthetics_sessions",
    "type": "permanent_retention_filters"
  }
}
EOF
# Path parameters
export app_id="CHANGE_ME"
export permanent_rf_id="synthetics_sessions"

# 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 PATCH "https://api.${DD_SITE}/api/v2/rum/applications/${app_id}/retention_filters/permanent/${permanent_rf_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "cross_product_sampling": {
        "trace_enabled": true,
        "trace_sample_rate": 50
      }
    },
    "id": "synthetics_sessions",
    "type": "permanent_retention_filters"
  }
}
EOF
# Path parameters
export app_id="CHANGE_ME"
export permanent_rf_id="synthetics_sessions"

# 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 PATCH "https://api.${DD_SITE}/api/v2/rum/applications/${app_id}/retention_filters/permanent/${permanent_rf_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "cross_product_sampling": {
        "trace_enabled": true,
        "trace_sample_rate": 50
      }
    },
    "id": "synthetics_sessions",
    "type": "permanent_retention_filters"
  }
}
EOF
# Path parameters
export app_id="CHANGE_ME"
export permanent_rf_id="synthetics_sessions"

# 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 PATCH "https://api.${DD_SITE}/api/v2/rum/applications/${app_id}/retention_filters/permanent/${permanent_rf_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "cross_product_sampling": {
        "trace_enabled": true,
        "trace_sample_rate": 50
      }
    },
    "id": "synthetics_sessions",
    "type": "permanent_retention_filters"
  }
}
EOF
# Path parameters
export app_id="CHANGE_ME"
export permanent_rf_id="synthetics_sessions"

# 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 PATCH "https://api.${DD_SITE}/api/v2/rum/applications/${app_id}/retention_filters/permanent/${permanent_rf_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "cross_product_sampling": {
        "trace_enabled": true,
        "trace_sample_rate": 50
      }
    },
    "id": "synthetics_sessions",
    "type": "permanent_retention_filters"
  }
}
EOF
# Path parameters
export app_id="CHANGE_ME"
export permanent_rf_id="synthetics_sessions"

# 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 PATCH "https://api.${DD_SITE}/api/v2/rum/applications/${app_id}/retention_filters/permanent/${permanent_rf_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "cross_product_sampling": {
        "trace_enabled": true,
        "trace_sample_rate": 50
      }
    },
    "id": "synthetics_sessions",
    "type": "permanent_retention_filters"
  }
}
EOF
# Path parameters
export app_id="CHANGE_ME"
export permanent_rf_id="synthetics_sessions"

# 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 PATCH "https://api.${DD_SITE}/api/v2/rum/applications/${app_id}/retention_filters/permanent/${permanent_rf_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "cross_product_sampling": {
        "trace_enabled": true,
        "trace_sample_rate": 50
      }
    },
    "id": "synthetics_sessions",
    "type": "permanent_retention_filters"
  }
}
EOF