Metrics API - DELETE a custom metric

Deletes the specified custom metric. Deletion cannot be undone!

You can't delete a metric if it has data points ingested within the last two hours.

DELETE
  • Managed https://{your-domain}/e/{your-environment-id}/api/v2/metrics/{metricId}
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/{metricId}

Authentication

To execute this request, you need the Write metrics (metrics.write) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Parameters

Parameter Type Description In Required
metricId string path required

Response

Response codes

Code Description
202

Success. The deletion of the metric has been triggered.

400

Failed. The metric has been written within the last two hours.

404

Failed. The metric cannot be found or the key cannot be parsed.

500

Failed. The deletion of metric dimensions failed.

Response body

A successful request doesn't return any content.