---
title: APM Retention Filters
description: Manage configuration of APM retention filters for your organization.
breadcrumbs: Docs > API > APM Retention Filters
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/llms.txt).

# 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](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/apm-retention-filters/list-all-apm-retention-filters.md)

| Datadog site      | API endpoint                                                          |
| ----------------- | --------------------------------------------------------------------- |
| 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 |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/apm/config/retention-filters      |
| 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 |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/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  |

## [Create a retention filter](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/apm-retention-filters/create-a-retention-filter.md)

| Datadog site      | API endpoint                                                           |
| ----------------- | ---------------------------------------------------------------------- |
| 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 |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/apm/config/retention-filters      |
| 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 |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/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  |

## [Get a given APM retention filter](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/apm-retention-filters/get-a-given-apm-retention-filter.md)

| Datadog site      | API endpoint                                                                      |
| ----------------- | --------------------------------------------------------------------------------- |
| 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} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/apm/config/retention-filters/{filter_id}      |
| 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} |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/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}  |

## [Update a retention filter](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/apm-retention-filters/update-a-retention-filter.md)

| Datadog site      | API endpoint                                                                      |
| ----------------- | --------------------------------------------------------------------------------- |
| 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} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/apm/config/retention-filters/{filter_id}      |
| 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} |
| uk1.datadoghq.com | PUT https://api.uk1.datadoghq.com/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}  |

## [Delete a retention filter](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/apm-retention-filters/delete-a-retention-filter.md)

| Datadog site      | API endpoint                                                                         |
| ----------------- | ------------------------------------------------------------------------------------ |
| 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} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v2/apm/config/retention-filters/{filter_id}      |
| 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} |
| uk1.datadoghq.com | DELETE https://api.uk1.datadoghq.com/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}  |

## [Re-order retention filters](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/apm-retention-filters/re-order-retention-filters.md)

| Datadog site      | API endpoint                                                                          |
| ----------------- | ------------------------------------------------------------------------------------- |
| 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 |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/apm/config/retention-filters-execution-order      |
| 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 |
| uk1.datadoghq.com | PUT https://api.uk1.datadoghq.com/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  |
