Docs/API reference / Observations
Query observations
Requires `developer_api.instrument_data.query` on the project-scoped Developer API connection. Use the API origin supplied for your deployment. Unknown query parameters and unexpected request bodies are rejected. Time ranges use an inclusive from and exclusive to. Query current raw/corrected observations or current calculated materializations; never treat nil readings as zero. Deployed limits are available from the public OpenAPI metadata endpoint.
The request panel saves credentials and API settings in this browser. Privacy details
Authorization
developerApiKey Project-scoped Developer API connection key. Grant only the required operation permissions.
In: header
Path Parameters
.*\S.*1 <= length <= 128Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The total number of variable_ids across all instruments is subject to the whole-request maximum declared by x-sansignal-max-total-variable-ids, in addition to each instrument's array bound.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/dev-api/v1/p/string/observations/query" \
-H "Content-Type: application/json" \
-d '{
"instruments": [
{
"instrument_id": "string",
"variable_ids": [
"string"
]
}
],
"from": "2019-08-24T14:15:22Z",
"to": "2019-08-24T14:15:22Z"
}'{
"request_id": "string",
"data": {
"variables": [
{
"instrument_id": "string",
"instrument_name": "string",
"instrument_lifecycle_state": "active",
"id": "string",
"name": "string",
"variable_lifecycle_state": "active",
"value_type": "decimal",
"unit": "cm"
}
],
"observations": [
{
"instrument_id": "string",
"variable_id": "string",
"instrument_timestamp": "2019-08-24T14:15:22Z",
"value_type": "decimal",
"decimal_value": 0,
"string_value": "string",
"quality": "pass",
"status": "raw",
"nil_reason": "string"
}
]
},
"next_cursor": "string"
}1 <= items <= 50date-timedate-time"asc"Value in
- "asc"
- "desc"
1 <= value <= 50001000