Enables or disables the specified calculated service metric on Grail.
PUT | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/calculatedMetrics/service/metricsOnGrail/{metricKey} |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/calculatedMetrics/service/metricsOnGrail/{metricKey} |
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
The key of the calculated service metric to be enabled/disabled on Grail.
ServiceMetricToGrail
objectEnable/Disable a calculated service metric on Grail
Is calculated service metric enabled on Grail
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"enabledOnGrail": true}
Success. The calculated service metric already was or has been enabled/disabled on Grail. Response doesn't have a body.
In this example, the request enables the Top 10 queries calculated service metric, which has the metric key of calc:service.top10queries.
curl -X 'PUT' \'https://mySampleEnv.live.dynatrace.com/api/config/v1/calculatedMetrics/service/metricsOnGrail/calc%3Aservice.top10queries' \-H 'accept: */*' \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
https://mySampleEnv.live.dynatrace.com/api/config/v1/calculatedMetrics/service/metricsOnGrail/calc%3Aservice.top10queries
204