• Home
  • Dynatrace API
  • Configuration
  • Calculated metrics
  • Service
  • DELETE a metric

Service metrics API - DELETE a metric

Deletes the specified calculated service metric. Deletion cannot be undone!

DELETEManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/calculatedMetrics/service/{metricKey}
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/calculatedMetrics/service/{metricKey}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/calculatedMetrics/service/{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 calculated service metric to be deleted.

pathrequired

Response

Response codes

CodeDescription
204

Success. The calculated service metric has been deleted. Response doesn't have a body.

Example

In this example, the request deletes the Requests by code calculated service metric created in the POST request example.

The API token is passed in the Authorization header.

The response code of 204 indicates that the update was successful.

Curl

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

Request URL

plaintext
https://mySampleEnv.live.dynatrace.com/api/config/v1/calculatedMetrics/service/calc:service.requestsbycode

Response code

204

Related topics
  • Calculated metrics for services

    Learn how to create a calculated metric based on web requests.

  • Multidimensional analysis

    Configure a multidimensional analysis view and save it as a calculated metric.