Metrics
Query timeseries data across multiple products
Query timeseries data across various data sources and process the data by applying formulas and functions.
post/api/v2/query/timeseries
Request
- Base URLhttps://api.datadoghq.com
- URLhttps://api.datadoghq.com/api/v2/query/timeseries
- 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/token scopes: timeseries_query
Request body
Example request
{
"data": {
"attributes": {
"formulas": [
{
"formula": "a+b",
"limit": {
"count": 10
}
}
],
"from": 1568899800000,
"interval": 5000,
"queries": [
{
"data_source": "metrics",
"query": "avg:system.cpu.user{*} by {env}"
}
],
"to": 1568923200000
},
"type": "timeseries_request"
}
}Response
OK
Example response
{
"data": {
"attributes": {
"series": [
{
"group_tags": [
"env:production"
],
"unit": [
{
"family": "time",
"name": "minute",
"plural": "minutes",
"scale_factor": 60,
"short_name": "min"
}
]
}
],
"times": [
1568899800000
],
"values": [
[
1575317847,
0.5
]
]
},
"type": "timeseries_response"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.