Get Timeseries
POST
/api/public/v1/timeseries
Endpoint for Retrieving Timeseries Data from Iris360#
device_id
and measure_id
specified, with the provided options applied directly to each pair.Details#
limit
or aggregation
settings are specific to each device_id
and measure_id
pair, rather than being applied globally across all requests.Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
array of:
device_ids
array[string]
required
measure_ids
array[string]
required
options
object (TimeSeriesOptions)
required
start_date
string | null
optional
end_date
string | null
optional
order
optional
limit
number | null
optional
>= 0
Default:
100
aggregation
optional
period
optional
query_id
string | null
optional
tenant
string
required
scope
string
required
Example
[
{
"device_ids": [
"urn:ngsi-ld:Device:Device001"
],
"measure_ids": [
"Measure_A",
"Measure_B"
],
"options": {
"query_id": "QueryId",
"order": "desc",
"end_date": "2025-01-01T10:00:30.063Z",
"start_date": "2025-01-02T10:40:30.000Z",
"limit": 200,
"tenant": "libelium",
"scope": "/"
}
}
]
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/public/v1/timeseries' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"device_ids": [
"urn:ngsi-ld:Device:Device001"
],
"measure_ids": [
"Measure_A", "Measure_B"
],
"options": {
"query_id": "QueryId",
"order": "desc",
"end_date": "2025-01-01T10:00:30.063Z",
"start_date": "2025-01-02T10:40:30.000Z",
"limit": 200,
"tenant": "libelium",
"scope": "/"
}
}
]'
Responses
🟢200Success
application/json
TimeSeriesResponse
for each request. Each response is linked to the original request using the query_id
field in the options response. The Options
field represents the final parameters applied to the request, including any default values and originally unspecified null values.TimeSeriesStructure
is returned for that measure, and no error message is generated. This also applies to cases where the entity does not exist, or an existing entity does not have a specified measure. Therefore, responses only include entries for measures that were successfully found. If no measures are found, the time_series
array will be empty, but the options
field will still be provided to detail the query context.Body
array of:
time_series
array[object (TimeSeries) {3}]
required
device_id
string
required
measure_id
string
required
values
array[object (TimeSeriesValue) {2}]
required
options
object (TimeSeriesOptions)
required
start_date
string | null
optional
end_date
string | null
optional
order
optional
limit
number | null
optional
>= 0
Default:
100
aggregation
optional
period
optional
query_id
string | null
optional
tenant
string
required
scope
string
required
Example
[
{
"time_series": [
{
"device_id": "urn:ngsi-ld:Device:Device001",
"measure_id": "measure_A",
"values": [
{
"timestamp": "2025-01-01T18:10:02.904Z",
"value": 1
},
{
"timestamp": "2025-01-01T19:29:26.026Z",
"value": 2
},
{
"timestamp": "2025-01-02T20:47:32.062Z",
"value": 3
}
]
},
{
"device_id": "urn:ngsi-ld:Device:Device001",
"measure_id": "measure_B",
"values": [
{
"timestamp": "2025-01-01T12:41:49.096Z",
"value": true
}
]
}
],
"options": {
"query_id": "QueryId",
"order": "desc",
"end_date": "2025-01-01T10:00:30.063Z",
"start_date": "2025-01-02T10:40:30.000Z",
"limit": 200,
"tenant": "OrganizationA",
"scope": "/"
}
}
]
🟠404Not Found
🟠403Forbidden
Modified at 2025-01-27 08:59:40