Service metrics API - DELETE a metric
Deletes the specified calculated service metric. Deletion cannot be undone!
DELETE | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/calculatedMetrics/service/{metricKey} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/calculatedMetrics/service/{metricKey} | |
Environment ActiveGate | https://{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
Parameter | Type | Description | In | Required |
---|---|---|---|---|
metricKey | string | The key of the calculated service metric to be deleted. | path | required |
Response
Response codes
Code | Description |
---|---|
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
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
https://mySampleEnv.live.dynatrace.com/api/config/v1/calculatedMetrics/service/calc:service.requestsbycode
Response code
204