device_id
and measure_id
specified, with the provided options applied directly to each pair.limit
or aggregation
settings are specific to each device_id
and measure_id
pair, rather than being applied globally across all requests.Authorization: Bearer ********************
[
{
"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": "/"
}
}
]
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": "/"
}
}
]'
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.[
{
"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": "/"
}
}
]