Skip to main content
POST
/
sensor-data
Fetch sensor data
curl --request POST \
  --url https://api.beta.ontoto.com/v1/sensor-data \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "parameterUuids": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "startDate": "2024-01-01T00:00:00.000Z",
  "endDate": "2024-01-31T23:59:59.000Z",
  "orderBy": "asc"
}
'
{
  "items": [
    {
      "deviceSerialNumber": "<string>",
      "deviceAlias": "<string>",
      "legacyDeviceId": 0,
      "sensorUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sensorAlias": "<string>",
      "channelIndex": 123,
      "sensorStatus": "<string>",
      "parameterUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "parameterName": "<string>",
      "parameterAlias": "<string>",
      "parameterSourceType": "<string>",
      "parameterStatus": "<string>",
      "displayPrecision": 123,
      "unit": "<string>",
      "data": [
        {
          "timestamp": "2023-11-07T05:31:56Z",
          "value": 123
        }
      ]
    }
  ]
}

Authorizations

x-api-key
string
header
required

Body

application/json

Request body for querying sensor data. The union of all the parameters is resolved.

parameterUuids
string<uuid>[]

Array of parameter UUIDs

deviceSerialNumbers
string[]

Array of device serial numbers

legacyDeviceIds
integer[]

Array of legacy device IDs

Required range: -9007199254740991 <= x <= 9007199254740991
sensorUuids
string<uuid>[]

Array of sensor UUIDs

parameterPaths
SensorParameterPath · object[]

Array of parameter paths to query specific data points

startDate
string<date-time>

Start date in ISO 8601 format

Example:

"2024-01-01T00:00:00.000Z"

endDate
string<date-time>

End date in ISO 8601 format

Example:

"2024-01-31T23:59:59.000Z"

orderBy
default:asc

Oldest first

Allowed value: "asc"
Example:

"asc"

aggregation
object

Optional aggregation to apply to each parameter over a time interval

disableRounding
boolean

Ignore the parameter's display precision and return values without rounding

includeDeleted
boolean

Include soft-deleted sensor data in results

Response

Successful response

Response body for querying sensor data

items
ScalarSensorDataItem · object[]
required