Deletes the specified custom ingested metric. Deletion cannot be undone!
DELETE | SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/{metricKey} |
Environment ActiveGateCluster ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/metrics/{metricKey} |
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.
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'
https://mySampleEnv.live.dynatrace.com/api/v2/metrics/cpu.temperature
202