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
| Item | Value |
|---|---|
| Base URL | http://<gateway-ip>:5000/api/vendor/v2 |
| Auth header | Authorization: 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:
| Value | Meaning |
|---|---|
all | The credential can reach every exposed item of that kind |
some | It is restricted to the specific ids granted to it |
none | It 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
nonefor 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 theaccessobject rather than assuming an emptyallowedDeviceIdsmeans unrestricted.
What each operation covers
GET /capabilities is the authoritative, live description of your gateway's surface. In general terms:
| Operation | Covers |
|---|---|
monitor | Live state, device/space listings, health, sensors, alarms, energy summary, and the event stream |
read | Full device and scene records, groups, schedules, and historical energy/sensor data |
control | Device, 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:
| Transport | How |
|---|---|
| WebSocket | ws://<gateway-ip>:5000/api/vendor/v2/events?key=<apiKey> |
| Server-Sent Events | GET /events with header Accept: text/event-stream |
| Long-poll | GET /events/poll?since=<seq>&timeout=<ms> |
| ASCII / line TCP | connect 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
type | Fired when |
|---|---|
device.state | A device's state changes ({ deviceId, state }) |
scene.activated | A scene is recalled |
group.state | A group's aggregate state changes |
sensor.reading | A sensor reports a new value |
occupancy.changed | Occupancy/presence changes |
button.pressed | A wall/keypad button is pressed |
alarm | An alarm is raised or cleared |
gateway.health | Gateway 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:
| Parameter | Purpose |
|---|---|
from / to | ISO 8601 date range |
deviceId | Limit 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.