Dynatrace version 1.330+
Deletes ingested metrics older than the specified number of days.
| DELETE | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v2/metrics |
| Environment and Cluster ActiveGate (default port 9999) | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/metrics |
To execute this request, you need an access token with metrics.write scope.
To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| metricSelector | string | The key of the required metric. | query | Required |
| minUnusedDays | integer | The key of the required metric. | query | Optional |
| Code | Type | Description |
|---|---|---|
| 202 | - | Success. The deletion of the metrics has been triggered. |
| 400 | - | Failed. |
| 500 | - | Failed. The bulk-deletion failed. |
| 4XX | Error | Client side error. |
| 5XX | Error | Server side error. |
In this example, the request deletes all metrics that have not been written in the last 60 days:
DELETE /api/v2/metrics?metricSelector=<your-selector>&minUnusedDays=60