• Home
  • Dynatrace API
  • Configuration
  • Calculated metrics
  • Log Monitoring
  • DELETE a metric

Log Monitoring metrics API - DELETE a metric

Deletes the specified calculated Log Monitoring metric. Deletion cannot be undone!

DELETEManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/calculatedMetrics/log/{metricKey}
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/calculatedMetrics/log/{metricKey}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/calculatedMetrics/log/{metricKey}

Authentication

To execute this request, you need an access token with WriteConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
metricKeystring

The key of the custom log metric to be deleted.

pathrequired

Response

Response codes

CodeTypeDescription
204

Deleted. Response doesn't have a body.

400ErrorEnvelope

Failed. See the response body for details

Example

In this example, the request deletes the Sample metric custom log metric. The response code of 204 indicates that the deletion was successful.

Curl

bash
curl -X DELETE \ https://mySampleEnv.live.dynatrace.com/api/config/v1/calculatedMetrics/log/calc:log.samplemetric \ -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'

Request URL

plaintext
https://mySampleEnv.live.dynatrace.com/api/config/v1/calculatedMetrics/log/calc:log.samplemetric

Response code

204

Related topics
  • Log Monitoring Classic

    Learn how to enable Log Monitoring, the insights that Log Monitoring can provide, and more.