API
Units
Retrieve units data for specified or all accessible stations with optional filters
Authorization
Authorization
RequiredBearer <token>In: header
Query Parameters
station_ids
stringComma-separated list of station IDs
to
stringDefault:
"2025-06-11T07:25:02.143Z"
Format: "date-time"
from
stringDefault:
"2025-06-10T07:25:02.144Z"
Format: "date-time"
type
array<unknown> | stringserial_number
stringThe serial number of the unit to filter by
direction
array<unknown> | stringResponse Body
Response containing units data
TypeScript Definitions
Use the response body type in TypeScript.
data
Requiredarray<object>message
Requiredstringmeta
objectStandard error response
TypeScript Definitions
Use the response body type in TypeScript.
error
RequiredobjectStandard error response
TypeScript Definitions
Use the response body type in TypeScript.
error
RequiredobjectStandard error response
TypeScript Definitions
Use the response body type in TypeScript.
error
RequiredobjectStandard error response
TypeScript Definitions
Use the response body type in TypeScript.
error
Requiredobjectcurl -X GET "https://example.com/units?station_ids=507f1f77bcf86cd799439011%2C507f1f77bcf86cd799439012&to=2025-06-11T07%3A25%3A02.143Z&from=2025-06-10T07%3A25%3A02.144Z&type=sensor&type=actuator&serial_number=string&direction=input&direction=output" \
-H "Authorization: Bearer <token>"
fetch("https://example.com/units?station_ids=507f1f77bcf86cd799439011%2C507f1f77bcf86cd799439012&to=2025-06-11T07%3A25%3A02.143Z&from=2025-06-10T07%3A25%3A02.144Z&type=sensor&type=actuator&serial_number=string&direction=input&direction=output", {
headers: {
"Authorization": "Bearer <token>"
}
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/units?station_ids=507f1f77bcf86cd799439011%2C507f1f77bcf86cd799439012&to=2025-06-11T07%3A25%3A02.143Z&from=2025-06-10T07%3A25%3A02.144Z&type=sensor&type=actuator&serial_number=string&direction=input&direction=output"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://example.com/units?station_ids=507f1f77bcf86cd799439011%2C507f1f77bcf86cd799439012&to=2025-06-11T07%3A25%3A02.143Z&from=2025-06-10T07%3A25%3A02.144Z&type=sensor&type=actuator&serial_number=string&direction=input&direction=output"
response = requests.request("GET", url, headers = {
"Authorization": "Bearer <token>"
})
print(response.text)
{
"data": [
{
"station_id": "string",
"slot": "string",
"unit_serial": "string",
"time_inserted": "string",
"time_created": "string",
"tz": "string",
"mode": "string",
"tags": [
"string"
],
"unit_type": "string",
"direction": "input",
"result": "string",
"metadata": null
}
],
"message": "Success",
"meta": {
"timestamp": "2019-08-24T14:15:22Z",
"request_id": "c2ed3e07-8c5f-4be9-b7ec-86bddcedd154",
"query_duration_ms": 0
}
}
{
"error": {
"code": "string",
"message": "string",
"details": null
}
}
{
"error": {
"code": "string",
"message": "string",
"details": null
}
}
{
"error": {
"code": "string",
"message": "string",
"details": null
}
}
{
"error": {
"code": "string",
"message": "string",
"details": null
}
}