Metrics
Update a derived metric
Update the definition of an existing derived metric. The id in the request body must match the metric_name path parameter. Requires the Manage Tags for Metrics permission.
put/api/v2/metrics/derived-metrics/{metric_name}
Request
- Base URLhttps://api.datadoghq.com
- Auth
- API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
- or OAuth 2Authorization code/oauth2/v1/authorizeToken URL/oauth2/v1/tokenScopesmetric_tags_write
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
metric_namestring required
The name of the metric.
Request body
Example request
{
"data": {
"attributes": {
"definition": {
"formula": "a",
"queries": [
{
"data_source": "metrics",
"name": "a",
"query": "avg:system.cpu.user{*}"
}
]
}
},
"id": "my.derived.metric",
"type": "derived_metrics"
}
}Response
OK
Example response
{
"data": {
"attributes": {
"definition": {
"formula": "a",
"queries": [
{
"data_source": "metrics",
"name": "a",
"query": "avg:system.cpu.user{*}"
}
]
}
},
"id": "my.derived.metric",
"type": "derived_metrics"
}
}Changes
Changes to this operation have not been checked yet.