Autumn Labs
DocsBlogCareers
API

Units

Retrieve units data for specified or all accessible stations with optional filters

GET
/units
AuthorizationBearer <token>

In: header

Query Parameters

station_ids?string

Comma-separated list of station IDs

to?string
Default"2025-06-27T23:46:42.268Z"
Formatdate-time
from?string
Default"2025-06-26T23:46:42.268Z"
Formatdate-time
type?array<string> & string

The unit types to filter by. Can be repeated (?type=sensor&type=actuator) or comma-separated (?type=sensor,actuator)

Default[]
serial_number?string

The serial number of the unit to filter by

direction?array<string> & string

The directions to filter by. Can be repeated (?direction=input&direction=output) or comma-separated (?direction=input,output)

Default["output"]

Response Body

curl -X GET "http://localhost:3000/units?station_ids=507f1f77bcf86cd799439011%2C507f1f77bcf86cd799439012&to=2025-06-27T23%3A46%3A42.268Z&from=2025-06-26T23%3A46%3A42.268Z&type=sensor%2Cactuator&serial_number=string&direction=input%2Coutput"
{
  "data": [
    {
      "station_id": "string",
      "slot": "string",
      "unit_serial": "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
  }
}