Log Monitoring metrics API - DELETE a metric
deprecated
This API is deprecated.
- For Log monitoring - Custom devices, Hosts, or Process Groups, what to use instead depends on which version of Log Monitoring you use:
- Log Management and Analytics: Grail Query API
- Log Monitoring Classic: Log Monitoring API
- For Calculated metrics - Log Monitoring, use the Settings API endpoint with schemaId
builtin:logmonitoring.schemaless-log-metric
.
Deletes the specified calculated Log Monitoring metric. Deletion cannot be undone!
DELETE | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/calculatedMetrics/log/{metricKey} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/calculatedMetrics/log/{metricKey} | |
Environment ActiveGate | https://{your-activegate-domain}:9999/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
Parameter | Type | Description | In | Required |
---|---|---|---|---|
metricKey | string | The key of the custom log metric to be deleted. | path | required |
Response
Response codes
Code | Type | Description |
---|---|---|
204 | - | Deleted. Response doesn't have a body. |
400 | ErrorEnvelope | 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
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
https://mySampleEnv.live.dynatrace.com/api/config/v1/calculatedMetrics/log/calc:log.samplemetric
Response code
204