Retrieves a list of data points from multiple time series in a project. This operation supports aggregation and pagination. Learn more about aggregation.
Note: when start
isn't specified in the top level and for an individual item, it will default to epoch 0, which is 1 January, 1970, thus
excluding potential existent data points before 1970. start
needs to be specified as a negative number to get data points before 1970.
Specify parameters to query for multiple data points. If you omit fields in individual data point query items, the top-level field values are used. For example, you can specify a default limit for all items by setting the top-level limit field. If you request aggregates, only the aggregates are returned. If you don't request any aggregates, all data points are returned.
required | Array of QueryWithInternalId (object) or QueryWithExternalId (object) or QueryWithInstanceId (object) (DatapointsQuery) [ 1 .. 100 ] items |
integer or string (TimestampOrStringStart) | |
integer or string (TimestampOrStringEnd) | |
limit | integer <int32> Default: 100 Returns up to this number of data points. The maximum is 100000 non-aggregated data points and 10000 aggregated data points in total across all queries in a single request. |
aggregates | Array of strings (Aggregate) non-empty unique Specify the aggregates to return. Omit to return data points without aggregation. |
granularity | string The time granularity size and unit to aggregate over. Valid entries are 'month, day, hour, minute, second', or short forms 'mo, d, h, m, s', or a multiple of these indicated by a number as a prefix. For 'second' and 'minute', the multiple must be an integer between 1 and 120 inclusive; for 'hour', 'day', and 'month', the multiple must be an integer between 1 and 100000 inclusive. For example, a granularity '5m' means that aggregates are calculated over 5 minutes. This field is required if aggregates are specified. |
includeOutsidePoints | boolean Default: false Defines whether to include the last data point before the requested time period and the first one after. This option can be useful for interpolating data. It's not available for aggregates or cursors. Note: If there are more than When doing manual paging (sequentially requesting smaller intervals instead of
requesting a larger interval and using cursors to get all the data points) with this
field set to true, the |
timeZone | string Default: "UTC" For aggregates of granularity 'hour' and longer, which time zone should we align to. Align to the start of the hour, start of the day or start of the month. For time zones of type Region/Location, the aggregate duration can vary, typically due to daylight saving time. For time zones of type UTC+/-HH:MM, use increments of 15 minutes. Note: Time zones with minute offsets (e.g. UTC+05:30 or Asia/Kolkata) may take longer to execute. Historical time zones, with offsets not multiples of 15 minutes, are not supported. |
ignoreUnknownIds | boolean Default: false Ignore IDs and external IDs that are not found |
Lists of data points for the specified queries.
IDs not found.
{- "items": [
- {
- "id": 1,
- "start": 0,
- "end": 0,
- "limit": 0,
- "aggregates": [
- "average"
], - "granularity": "1h",
- "targetUnit": "temperature:deg_f",
- "targetUnitSystem": "imperial",
- "includeOutsidePoints": false,
- "includeStatus": false,
- "ignoreBadDataPoints": true,
- "treatUncertainAsBad": true,
- "cursor": "string",
- "timeZone": "Europe/Oslo or UTC+05:30"
}
], - "start": 0,
- "end": 0,
- "limit": 100,
- "aggregates": [
- "average"
], - "granularity": "1h",
- "includeOutsidePoints": false,
- "timeZone": "Europe/Oslo or UTC+05:30",
- "ignoreUnknownIds": false
}
{- "items": [
- {
- "id": 1,
- "externalId": "string",
- "instanceId": {
- "space": "string",
- "externalId": "string"
}, - "isString": false,
- "isStep": true,
- "unit": "string",
- "unitExternalId": "string",
- "nextCursor": "string",
- "datapoints": [
- {
- "timestamp": 1638795554528,
- "average": 0,
- "max": 0,
- "min": 0,
- "count": 0,
- "sum": 0,
- "interpolation": 0,
- "stepInterpolation": 0,
- "continuousVariance": 0,
- "discreteVariance": 0,
- "totalVariation": 0,
- "countGood": 0,
- "countUncertain": 0,
- "countBad": 0,
- "durationGood": 0,
- "durationUncertain": 0,
- "durationBad": 0
}
]
}
]
}