IRIS360 PUBLIC API
  1. Timeseries
IRIS360 PUBLIC API
  • iris360
    • Timeseries
      • Get Timeseries
        POST
    • Entities
      • Paginate Entitites
      • Get entity latest data
    • Auth
      • Get user token
      • Refresh user token
    • Connectors
      • Out
        • Paginate Connectors
        • Update Connector Models
        • Get Connector
    • Devices
      • Paginate Devices
      • Import file
      • Send Commands in Bulk
  1. Timeseries

Get Timeseries

POST
/api/public/v1/timeseries

Endpoint for Retrieving Timeseries Data from Iris360#

This endpoint accepts an array of requests, allowing access to data across multiple entities. Each query is executed individually for every combination of device_id and measure_id specified, with the provided options applied directly to each pair.

Details#

Specificity: Options such as limit or aggregation settings are specific to each device_id and measure_id pair, rather than being applied globally across all requests.
Defaults: Unspecified values are automatically assigned default values where applicable.
Null Values: If a null value is explicitly provided, it will be used as the value instead of any default.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

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 Code 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
Successful Response Structure
The response includes a 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.
The response attempts to retrieve all specified measures. If a measure is not found, no 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

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
Next
Paginate Entitites
Built with