Timeseries Anomaly Investigations
Investigate a timeseries anomaly
Investigates a metrics timeseries request for its most significant anomalies and returns deterministic findings. Metrics queries with or without grouping are supported. This API version accepts exactly one request and returns at most three anomalies.
post/api/v2/timeseries-anomaly-investigations
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/tokenScopestimeseries_query, metrics_read
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"data": {
"attributes": {
"requests": [
{
"formulas": [
{
"formula": "query1"
}
],
"from": 1754406000000,
"queries": [
{
"data_source": "metrics",
"name": "query1",
"query": "avg:system.cpu.user{env:prod} by {service}"
}
],
"to": 1754423940000
}
]
},
"type": "timeseries_anomaly_investigation"
}
}Response
OK
Example response
{
"data": {
"attributes": {
"results": [
{
"anomalies": [],
"status": "complete"
}
]
},
"id": "0",
"type": "timeseries_anomaly_investigation"
},
"meta": {
"from_date": 1754406000000,
"interval": 60000,
"queries": [
{
"name": "query1",
"status": "done"
}
],
"res_type": "timeseries_anomaly_investigation",
"results_warnings": [],
"to_date": 1754423940000
}
}Changes
Changes to this operation have not been checked yet.