Gets historical data for a particular index, over a fixed period of time
GET/api/v1/history/values
The data will be sorted by time, in ascending order. The time range of the data is defined by the timespan
and timestamp
parameters. The timestamp
must be truncated to the timespan
granularity. See the timespan
parameter description for some working examples. In order to access this data, the user has to be authorized for the index and the STREAM_HISTORICAL_VALUES data stream. Note: the most recent values may not be immediately available, and could be delayed by up to 15 minutes.
Request
Query Parameters
The id of the index
The fixed period of time to get the data for. Can be (YEAR | MONTH | DAY | HOUR). For indices that are published every second, the allowable periods are (DAY | HOUR). For indices that are published on a daily / hourly basis, the allowable periods are (YEAR | MONTH). Note that in order to access historical values for a particular index, the STREAM_HISTORICAL_VALUES permission is required on that index.
An ISO8601 timestamp to define the start of the period to get the data for. Data will be available through this endpoint at most an hour after the time interval has passed. For more recent and live values please use /api/v1/values instead. Note that the timestamp must be truncated to the timespan granularity. For example, here are some acceptable (timespan, timestamp) pairs: (YEAR, 2024-01-01T09:00:00.000Z), (YEAR, 2024-01-01T09:00:00.000Z) (MONTH, 2024-01-01T09:00:00.000Z), (MONTH, 2024-01-01T09:00:00.000Z), (MONTH, 2024-01-01T09:00:00.000Z) (DAY, 2024-01-01T09:00:00.000Z), (DAY, 2024-01-01T09:00:00.000Z), (DAY, 2024-01-01T09:00:00.000Z) (HOUR, 2024-01-01T09:00:00.000Z), (HOUR, 2024-01-01T09:00:00.000Z), (HOUR, 2024-01-01T09:00:00.000Z).
Responses
- 200
successful operation
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
description of error in natural language, absent in case of successful operation
payload
object[]
nullable
The response data
{
"serverTime": "2024-01-01T09:00:00.000Z",
"error": "string",
"payload": [
{
"time": 0,
"value": "string"
}
]
}