Skip to documentation content

Integrations

Vendor API: Monitoring & Status

Verify credentials and read energy data and gateway health.

On this page

Read-only endpoints for checking your credential, subscribing to live events, reading energy data, and monitoring gateway health through the Vendor API.

See Authentication for authentication, and the Endpoint Reference for the full list of vendor endpoints.

Base & Authentication

ItemValue
Base URLhttp://<gateway-ip>:5000/api/vendor/v2
Auth headerAuthorization: Bearer <apiKey>

The unversioned /api/vendor path still works as a legacy alias.

Verify your credential

GET /me

Returns your credential's identity and exactly what it may access — the fastest way to confirm setup and debug a 403.

{
  "success": true,
  "data": {
    "credentialId": "72e128ae-...",
    "name": "Crestron Test (Vendor API)",
    "authType": "bearer",
    "allowedOperations": ["monitor", "read", "control"],
    "deniedOperations": [],
    "allowedDeviceIds": [],
    "allowedSceneIds": [],
    "access": { "devices": "all", "scenes": "all", "groups": "all", "spaces": "all" },
    "restricted": false,
    "expiresAt": null
  }
}

Reading access correctly

Read the access object, not the raw id lists. Each of devices, scenes, groups, and spaces reports one of:

ValueMeaning
allThe credential can reach every exposed item of that kind
someIt is restricted to the specific ids granted to it
noneIt has been granted no access to that kind

Note: Newly created credentials start with no access until an administrator grants it — a fresh key will show none for a kind until devices, scenes, groups, or spaces are added to its allow-list. (Older credentials created before this change keep their previous behaviour, where an empty list meant "all".) Always confirm with the access object rather than assuming an empty allowedDeviceIds means unrestricted.

What each operation covers

GET /capabilities is the authoritative, live description of your gateway's surface. In general terms:

OperationCovers
monitorLive state, device/space listings, health, sensors, alarms, energy summary, and the event stream
readFull device and scene records, groups, schedules, and historical energy/sensor data
controlDevice, group, area, and scene commands (subject to the matching control:* / write:scenes scope)

Events — subscribe to live updates

Rather than polling, subscribe to the gateway's event stream. The same event envelopes are delivered over four transports — pick whichever your platform supports:

TransportHow
WebSocketws://<gateway-ip>:5000/api/vendor/v2/events?key=<apiKey>
Server-Sent EventsGET /events with header Accept: text/event-stream
Long-pollGET /events/poll?since=<seq>&timeout=<ms>
ASCII / line TCPconnect to TCP port 41800

All require the monitor operation. Each event is a JSON envelope { seq, type, timestamp, ...payload }.

Resuming without missing events

Every event carries a monotonic seq. To resume after a disconnect, reconnect with since=<last seq you processed> (WebSocket/long-poll) or the Last-Event-ID header (SSE), and the gateway replays what you missed. If you receive a stream.overflow event, you fell too far behind the buffer — re-read full state (e.g. GET /devices) and continue from the new seq.

Event types

typeFired when
device.stateA device's state changes ({ deviceId, state })
scene.activatedA scene is recalled
group.stateA group's aggregate state changes
sensor.readingA sensor reports a new value
occupancy.changedOccupancy/presence changes
button.pressedA wall/keypad button is pressed
alarmAn alarm is raised or cleared
gateway.healthGateway health/connectivity changes

WebSocket example

const ws = new WebSocket(
  "ws://<gateway-ip>:5000/api/vendor/v2/events?key=<apiKey>"
);
ws.onmessage = (e) => {
  const evt = JSON.parse(e.data);
  console.log(evt.seq, evt.type, evt);
};

Energy — current

GET /energy — operation: monitor, scope: read:energy

{
  "success": true,
  "data": { "readings": [ { "deviceId": "319701d5-...", "powerWatts": 0.5, "timestamp": "2026-08-07T..." } ] }
}

Energy — history

GET /energy/history — operation: read, scope: read:energy

Historical energy logs. Filter with query parameters:

ParameterPurpose
from / toISO 8601 date range
deviceIdLimit to a single device

Returns { success, data: { count, logs[] } }.

Bridge health

GET /health — operation: monitor

{
  "success": true,
  "data": { "serialConnected": true, "onlineDevices": 4, "totalDevices": 6, "uptimeSeconds": 164413 }
}

Use this as a lightweight liveness check for your integration.