Skip to main content

Controller Public API

The Controller Public API is a REST integration surface on each Aida Controller (on-premises). It is intended for third-party systems — BMS adjuncts, custom dashboards, municipal integrations, and automation scripts — and is not used by the controller web UI.

Controller 2.0 exposes the same URL paths, request payloads, and response shapes as Controller 1.0 so existing integrators can migrate without client changes.

:::info Separate from Platform API This API runs on the controller appliance (https://{controller-host}/aida/api/…). It is different from the Aida Platform cloud API (https://api.aida-platform.com/api/…) documented elsewhere on this site. :::

Base URL

https://{controller-host}/aida/api/{endpoint}
ExampleURL
Local networkhttps://192.168.1.77/aida/api/getClusters
Via platform tunnelhttps://controller.aida-platform.com/aida/api/getClusters

Paths use camelCase endpoint names (for example getClusters, not /clusters).

Interactive docs (Swagger) on the controller: https://{controller-host}/docs — look for the public-api tag (second section after health).

Authentication

Obtain a token

POST /aida/api/authenticate — no auth required.

curl -s -X POST "https://192.168.1.77/aida/api/authenticate" \
-H "Content-Type: application/json" \
-d '{"username":"apiuser","password":"your-password"}'

Success:

{
"responseCode": 1,
"auth_token": "eyJhbG...",
"refresh_token": "eyJhbG...",
"tokenExpiresOn": "2026-06-16T12:00:00Z"
}

Failure:

{
"responseCode": 0,
"errorCode": "AuthFailed"
}

Notes:

  • Use the field auth_token, not token.
  • The account must have the api_service role (or an admin/operator role used for integration testing).
  • Default access token lifetime is 3600 seconds (1 hour).

Refresh a token

POST /aida/api/refreshToken

{ "refresh_token": "eyJhbG..." }

Success: { "status": true, "message": "Token valid", "auth_token": "…" }

Authenticated requests

All other endpoints require:

Authorization: Bearer {auth_token}
HTTP methodPermission
GETread
POSTwrite

Errors: 401{"status": 0, "message": "Authentication required"} · 403 → empty body

Targeting model

Control and read endpoints share these fields:

FieldTypeDescription
targetTypeinteger1 = all, 2 = cluster, 3 = specific target
targetIdintegerRequired when targetType is 2 or 3
Endpoint familytargetType=2targetType=3
Lightingcluster IDnode/fixture ID
Shadescluster IDshade ID (not node ID)

IDs are integer legacy IDs (Controller 1.0 compatible). Controller 2.0 assigns and persists them automatically in device/cluster metadata.

Endpoints

Discovery & state

MethodPathDescription
GET/getClustersList clusters with aggregate dim/CCT/RGBW/shade state
GET/getActiveNodesOnline light nodes with current state
GET/getNodesForClusterNodes in one cluster (?clusterId=&tagType=ALL|NODE|PERIPHERAL)
GET/getLightLevelsControl state rows (?targetType=&targetId=)
GET/getShadesAll shades with position (shadeLevel 0–100)
GET/getShadesForClusterShades in one cluster (?clusterId=)

GET /getClusters response (array)

[
{
"id": 1,
"name": "Lobby",
"createdByName": "system",
"createdOn": "2024-01-15T10:30:00Z",
"nodeCount": 12,
"dimLevel": 80,
"shadeLevel": 50,
"colorLevel": 4000,
"rgbw": "255:128:0:100"
}
]

GET /getLightLevels response (array)

[
{
"Id": 1,
"ClusterId": 12,
"NodeId": 42,
"value": "80",
"valueType": "DIM_LEVEL",
"Synchronize": "",
"AllVal": ""
}
]

valueType values: DIM_LEVEL, COLOR_LEVEL, COLOR, SHADE_LEVEL, PPOWER

:::note Shade position Controller 1.0 has no dedicated getShadePosition route. Read position from GET /getShades (shadeLevel field) or GET /getShadesForCluster. :::

Control

MethodPathDescription
POST/channelControlOn / off / dim (command: ON, OFF, DIM)
POST/setColorTempColor temperature in Kelvin (colorTemp, clamped 3000–5000)
POST/setRGBWRGBW + dim (R,G,B,W 0–255; DL 0–100 or 101 = keep current dim)
POST/shadeControlShade motor (command: UP, DOWN, STOP, POS; posValue when POS)

Control endpoints return:

{ "status": 1 }

(0 on failure). shadeControl also returns "shadeState".

Dim a cluster

curl -s -X POST "https://192.168.1.77/aida/api/channelControl" \
-H "Authorization: Bearer eyJhbG..." \
-H "Content-Type: application/json" \
-d '{
"targetType": 2,
"targetId": 12,
"channelId": 1,
"command": "DIM",
"dimLevel": 50
}'

Set shade position

curl -s -X POST "https://192.168.1.77/aida/api/shadeControl" \
-H "Authorization: Bearer eyJhbG..." \
-H "Content-Type: application/json" \
-d '{
"targetType": 3,
"targetId": 5,
"command": "POS",
"posValue": 75
}'

Set color temperature

curl -s -X POST "https://192.168.1.77/aida/api/setColorTemp" \
-H "Authorization: Bearer eyJhbG..." \
-H "Content-Type: application/json" \
-d '{"targetType": 2, "targetId": 12, "colorTemp": 4000}'

Example integration flow

# 1. Authenticate
TOKEN=$(curl -s -X POST "https://192.168.1.77/aida/api/authenticate" \
-H "Content-Type: application/json" \
-d '{"username":"apiuser","password":"secret"}' \
| jq -r '.auth_token')

# 2. List clusters
curl -s "https://192.168.1.77/aida/api/getClusters" \
-H "Authorization: Bearer $TOKEN"

# 3. Read light levels for cluster 12
curl -s "https://192.168.1.77/aida/api/getLightLevels?targetType=2&targetId=12" \
-H "Authorization: Bearer $TOKEN"

# 4. Read shade positions
curl -s "https://192.168.1.77/aida/api/getShades" \
-H "Authorization: Bearer $TOKEN"

Controller 2.0 vs internal API

TopicPublic API (/aida/api/*)Internal UI API (/api/v1/*)
AudienceExternal integratorsController web UI
IDsInteger legacy IDsUUIDs
Auth responseauth_token, responseCodeaccess_token, token_type
Path style/aida/api/getClusters/api/v1/clusters

Do not mix the two APIs in one client without adapting IDs and response parsing.

PathUse when
Controller Public API (this doc)REST control from BMS scripts, legacy 1.0 clients
Controller BACnet/IP ServerBMS requires BACnet ReadProperty / WriteProperty
Municipal BMS Integration BriefGovernment submittals, PICS, commissioning, Level 1 vs 2
Aida Platform APIMulti-site cloud management, not per-controller control
Webex integrationWorkspace widget → controller actions

Creating API users

On Controller 2.0, create a user with role api_service via the controller admin UI or internal API (POST /api/v1/auth/users). That account can authenticate against /aida/api/authenticate.


Controller version: 2.0+ · Compatibility: Controller 1.0 public API contract