Skip to main content
POST
/
sensor-data
Fetch sensor data
curl --request POST \
  --url https://api.beta.ontoto.com/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": "ok",
      "parameterUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "parameterName": "<string>",
      "parameterAlias": "<string>",
      "parameterSourceType": "derived",
      "parameterStatus": "ok",
      "displayPrecision": 123,
      "unit": "<string>",
      "data": [
        {
          "timestamp": "2023-11-07T05:31:56Z",
          "value": 123
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.beta.ontoto.com/llms.txt

Use this file to discover all available pages before exploring further.

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

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
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

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
parameterPaths
object[]

Array of parameter paths to query specific data points

startDate
string<date-time>

Start date in ISO 8601 format

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

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

endDate
string<date-time>

End date in ISO 8601 format

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

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

orderBy
enum<string>
default:asc

Ordering of data by timestamp

Available options:
asc,
desc
Example:

"asc"

aggregation
object

Optional aggregation to apply to each parameter over a time interval

disableRounding
boolean

Disable rounding and return values in full precision

Response

Successful response

Response body for querying sensor data

items
object[]
required