Metrics API - DELETE a custom metric
Deletes the specified custom ingested metric. Deletion cannot be undone!
- You can't delete a metric if it has data points ingested within the last two hours.
- You can only delete metrics that have been ingested via the Metrics v2 API.
To execute this request, you need an access token with Write metrics (
metrics.write) scope. To learn how to obtain and use it, see Tokens and authentication.
The key of the required metric.
Success. The deletion of the metric has been triggered.
Failed. The metric has been written within the last two hours.
Failed. The metric cannot be found or the key cannot be parsed.
Failed. The deletion of metric dimensions failed.
In this example, the request deletes the cpu.temperature metric. The response code of 202 indicates that the deletion has been triggered successfully.
The API token is passed in the Authorization header.
curl --request DELETE \ --url https://mySampleEnv.live.dynatrace.com/api/v2/metrics/cpu.temperature \ --header 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'