Timeseries
Example
Request params
{
"report": "member_balance",
"filter": null,
"aggregate_by": "consents",
"interval": "auto",
"from": "2024-04-08T00:00:00.000-06:00",
"to": "2024-04-25T00:00:00.000-06:00"
}
Response
{
"interval": "1d",
"range_timezone": "America/Denver",
"time_buckets": [
"2024-04-08T00:00:00.000-06:00",
"2024-04-09T00:00:00.000-06:00",
"2024-04-11T00:00:00.000-06:00",
"2024-04-22T00:00:00.000-06:00",
"2024-04-23T00:00:00.000-06:00",
"2024-04-24T00:00:00.000-06:00",
"2024-04-25T00:00:00.000-06:00"
],
"series": [
{
"label": {
"type": "out"
},
"values": [2,2,1,1,null,1,5]
},
{
"label": {
"type": "in"
},
"values": [null,4,300,2,1,null,11]
}
],
"data_points": 11,
"result_type": "timeseries"
}
Intervals
5m
, 1h
, 1d
, 1w
and 1mo
intervals unless it's stated differently in Metadata
endpoint.Interval | Time bucket interval | Retention time |
---|---|---|
5m | 5 minutes | 14 days |
1h | 1 hour | 6 months |
1d | 1 day | 2 years |
1w | 1 week | forever* |
1mo | 1 month | forever* |
interval
request param
interval
request parameter.You can use specific interval (like
1d
) or default - auto
.auto
automatically chooses interval based on logic:to
- from
difference is less or equal to 12 hours then 5m
to
- from
difference is less or equal to 3 days then 1h
1d
Time buckets
5m
interval: 11:00:00
, 11:05:00
, 11:10:00
, etc.Series
label
- an object which describes the seriesvalues
- array of numbers. Each number is a value in the corresponding time bucket.timezone
(optional) - see Timezones handling
null
.Query limits
Time points (number of time buckets)
150
time points.1d
interval, number of days between from
and to
parameters must be less or equal to 150
5m
interval, number of 5m
buckets between from
and to
must be less or equal to 150
150
time points will return 422
HTTP error.from
and to
parameters yourself.Data points
1000
data points.1000
data points will not return HTTP error. Returned data will be just limited to 1000
data points. You can see how many data points were returned by the query via data_points
response field.filter
or from
/to
params to scope down the query.What is a data point?
null
values.3
series in which:10
non null
values5
non null
values15
non null
values10+5+15 = 30
1000
data points limit unless your query returns more than 6
series.Timezones handling
Modified at 2024-10-31 06:58:59