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

Re-order retention filters

PUThttps://api.datadoghq.com/api/v2/apm/config/retention-filters-execution-orderhttps://api.us3.datadoghq.com/api/v2/apm/config/retention-filters-execution-orderhttps://api.us5.datadoghq.com/api/v2/apm/config/retention-filters-execution-orderhttps://api.datadoghq.eu/api/v2/apm/config/retention-filters-execution-orderhttps://api.ap1.datadoghq.com/api/v2/apm/config/retention-filters-execution-orderhttps://api.ap2.datadoghq.com/api/v2/apm/config/retention-filters-execution-orderhttps://api.uk1.datadoghq.com/api/v2/apm/config/retention-filters-execution-orderhttps://api.ddog-gov.com/api/v2/apm/config/retention-filters-execution-orderhttps://api.us2.ddog-gov.com/api/v2/apm/config/retention-filters-execution-order

Overview

Re-order the execution order of retention filters.

This endpoint requires the apm_retention_filter_write permission.

Request

Body Data (required)

The list of retention filters in the new order.

Field
Type
Description
data [required]
[object]

A list of retention filters objects.

Response

OK

Code Example

Re-order retention filters returns "OK" response
# 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 PUT "https://api.${DD_SITE}/api/v2/apm/config/retention-filters-execution-order" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "id": "jdZrilSJQLqzb6Cu7aub9Q",
      "type": "apm_retention_filter"
    },
    {
      "id": "7RBOb7dLSYWI01yc3pIH8w",
      "type": "apm_retention_filter"
    }
  ]
}
EOF
# 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 PUT "https://api.${DD_SITE}/api/v2/apm/config/retention-filters-execution-order" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "id": "jdZrilSJQLqzb6Cu7aub9Q",
      "type": "apm_retention_filter"
    },
    {
      "id": "7RBOb7dLSYWI01yc3pIH8w",
      "type": "apm_retention_filter"
    }
  ]
}
EOF
# 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 PUT "https://api.${DD_SITE}/api/v2/apm/config/retention-filters-execution-order" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "id": "jdZrilSJQLqzb6Cu7aub9Q",
      "type": "apm_retention_filter"
    },
    {
      "id": "7RBOb7dLSYWI01yc3pIH8w",
      "type": "apm_retention_filter"
    }
  ]
}
EOF
# 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 PUT "https://api.${DD_SITE}/api/v2/apm/config/retention-filters-execution-order" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "id": "jdZrilSJQLqzb6Cu7aub9Q",
      "type": "apm_retention_filter"
    },
    {
      "id": "7RBOb7dLSYWI01yc3pIH8w",
      "type": "apm_retention_filter"
    }
  ]
}
EOF
# 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 PUT "https://api.${DD_SITE}/api/v2/apm/config/retention-filters-execution-order" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "id": "jdZrilSJQLqzb6Cu7aub9Q",
      "type": "apm_retention_filter"
    },
    {
      "id": "7RBOb7dLSYWI01yc3pIH8w",
      "type": "apm_retention_filter"
    }
  ]
}
EOF
# 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 PUT "https://api.${DD_SITE}/api/v2/apm/config/retention-filters-execution-order" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "id": "jdZrilSJQLqzb6Cu7aub9Q",
      "type": "apm_retention_filter"
    },
    {
      "id": "7RBOb7dLSYWI01yc3pIH8w",
      "type": "apm_retention_filter"
    }
  ]
}
EOF
# 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 PUT "https://api.${DD_SITE}/api/v2/apm/config/retention-filters-execution-order" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "id": "jdZrilSJQLqzb6Cu7aub9Q",
      "type": "apm_retention_filter"
    },
    {
      "id": "7RBOb7dLSYWI01yc3pIH8w",
      "type": "apm_retention_filter"
    }
  ]
}
EOF
# 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 PUT "https://api.${DD_SITE}/api/v2/apm/config/retention-filters-execution-order" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "id": "jdZrilSJQLqzb6Cu7aub9Q",
      "type": "apm_retention_filter"
    },
    {
      "id": "7RBOb7dLSYWI01yc3pIH8w",
      "type": "apm_retention_filter"
    }
  ]
}
EOF
# 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 PUT "https://api.${DD_SITE}/api/v2/apm/config/retention-filters-execution-order" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "id": "jdZrilSJQLqzb6Cu7aub9Q",
      "type": "apm_retention_filter"
    },
    {
      "id": "7RBOb7dLSYWI01yc3pIH8w",
      "type": "apm_retention_filter"
    }
  ]
}
EOF