Developer API

Read your device telemetry via a REST endpoint or subscribe to live updates with Server‑Sent Events (SSE). Authentication is per‑device using your API key.

Authentication

  • REST: send your device’s API key in the X-API-Key header.
  • SSE: browsers can’t set headers for EventSource, so pass it as a query param: ?api_key=YOUR_KEY.

Read Historical Telemetry (REST)

GET /devapi/telemetry?limit=100&since=2025-08-01T00:00:00Z
Header: X-API-Key: <YOUR_DEVICE_API_KEY>

Example (curl):

curl -H "X-API-Key: YOUR_DEVICE_API_KEY" \
  "https://sigstreamcloud.com/devapi/telemetry?limit=50"

Response shape:

[
  {
    "id": 12345,
    "device_id": "ABC123",
    "label": "Water Tanker",
    "data": {"rssi": -70, "value": 42},
    "timestamp": 1723200000,
    "ts_iso": "2025-08-09T10:00:00Z"
  },
  ...
]

Live Stream (SSE)

GET /devapi/stream?api_key=YOUR_DEVICE_API_KEY

Example (curl):

curl -N "https://sigstreamcloud.com/devapi/stream?api_key=YOUR_DEVICE_API_KEY"

Browser example:

<script>
const es = new EventSource("/devapi/stream?api_key=YOUR_DEVICE_API_KEY");
es.addEventListener("telemetry", (e) => {
  const row = JSON.parse(e.data);
  console.log("telemetry", row);
});
es.addEventListener("heartbeat", (e) => {
  const hb = JSON.parse(e.data);
  console.log("heartbeat", hb);
});
es.onerror = (e) => console.warn("SSE error:", e);
</script>

Status Codes

  • 401 Missing/invalid API key
  • 403 API key not bound or bound to another device
  • 200 Success