Query analytics
POST
/v1/analytics/queryRequires the scope analytics:read
Metric values for a period, by member, team or not grouped. Each value comes with its sample size; below a metric's minimum sample it is null with the reason not_enough_data.
#Request body
application/json
compare_previousboolean
filtersobjectrequired
The days a query covers: a
period, or a custom range from to to (both dates
included, at most 731 days).Show child attributesHide child attributes
fromstring (date) or null
membersstring[]
ownerstring or null
periodstring or null
positionsstring[]
teamsstring[]
tostring (date) or null
group_bystring or null
metricsstring[]required
#Responses
200Successful Response
Show response fieldsHide response fields
dataobject[]required
Show child attributesHide child attributes
groupobject or nullrequired
Show child attributesHide child attributes
keystringrequired
labelstringrequired
metricsobject (values: object)required
Show child attributesHide child attributes
previousobject or nullrequired
Show child attributesHide child attributes
reasonstring or nullrequired
sample_sizeintegerrequired
unknown_countintegerrequired
valueinteger | number | object[] or nullrequired
reasonstring or nullrequired
sample_sizeintegerrequired
unknown_countintegerrequired
valueinteger | number | object[] or nullrequired
group_bystring or nullrequired
metricsobject[]required
Show child attributesHide child attributes
descriptionstringrequired
keystringrequired
labelstringrequired
unitstringrequired
ownerstringrequired
periodobjectrequired
Show child attributesHide child attributes
ends_onstring (date)required
labelstringrequired
starts_onstring (date) or nullrequired
time_zonestringrequired
valuestringrequired
previous_periodobject or nullrequired
Show child attributesHide child attributes
ends_onstring (date)required
labelstringrequired
starts_onstring (date) or nullrequired
time_zonestringrequired
valuestringrequired
#Errors
Errors use the standard error shape.
| Status | Meaning |
|---|---|
400 | The request is not valid. |
401 | Not signed in, or the credentials are not valid. |
402 | The balance is too low. |
403 | Not allowed to do this. |
404 | Not found. |
409 | Conflicts with the current state. |
413 | The request body is too large. |
415 | The content type is not supported. |
422 | A value in the request is not valid. |
429 | Too many requests. Wait for Retry-After seconds. |
500 | Something went wrong on our side. |
502 | A service Valeron depends on refused the request. |
503 | A service Valeron depends on is unavailable. |
