---
title: APM Retention Filters
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > APM Retention Filters
---

# APM Retention Filters

Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters) for your organization. You need an API and application key with Admin rights to interact with this endpoint. See [retention filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention.md#retention-filters) on the Trace Retention page for more information.

## List all APM retention filters →{% #list-all-apm-retention-filters %}

| Datadog site      | API endpoint                                                          |
| ----------------- | --------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/apm/config/retention-filters |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/apm/config/retention-filters |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/apm/config/retention-filters      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/apm/config/retention-filters      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/apm/config/retention-filters  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/apm/config/retention-filters     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/apm/config/retention-filters |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/apm/config/retention-filters |

## Create a retention filter →{% #create-a-retention-filter %}

| Datadog site      | API endpoint                                                           |
| ----------------- | ---------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/apm/config/retention-filters |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/apm/config/retention-filters |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/apm/config/retention-filters      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/apm/config/retention-filters      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/apm/config/retention-filters  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/apm/config/retention-filters     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/apm/config/retention-filters |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/apm/config/retention-filters |

## Get a given APM retention filter →{% #get-a-given-apm-retention-filter %}

| Datadog site      | API endpoint                                                                      |
| ----------------- | --------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/apm/config/retention-filters/{filter_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/apm/config/retention-filters/{filter_id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/apm/config/retention-filters/{filter_id}  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |

## Update a retention filter →{% #update-a-retention-filter %}

| Datadog site      | API endpoint                                                                      |
| ----------------- | --------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/apm/config/retention-filters/{filter_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/apm/config/retention-filters/{filter_id}      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v2/apm/config/retention-filters/{filter_id}  |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |

## Delete a retention filter →{% #delete-a-retention-filter %}

| Datadog site      | API endpoint                                                                         |
| ----------------- | ------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v2/apm/config/retention-filters/{filter_id}      |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v2/apm/config/retention-filters/{filter_id}      |
| us2.ddog-gov.com  | DELETE https://api.us2.ddog-gov.com/api/v2/apm/config/retention-filters/{filter_id}  |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id}     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v2/apm/config/retention-filters/{filter_id} |

## Re-order retention filters →{% #re-order-retention-filters %}

| Datadog site      | API endpoint                                                                          |
| ----------------- | ------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v2/apm/config/retention-filters-execution-order |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/apm/config/retention-filters-execution-order |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/apm/config/retention-filters-execution-order      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/apm/config/retention-filters-execution-order      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v2/apm/config/retention-filters-execution-order  |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v2/apm/config/retention-filters-execution-order     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/apm/config/retention-filters-execution-order |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/apm/config/retention-filters-execution-order |
