Overview
The StatStream REST API lets external applications securely interact with your organization’s resources — Workspaces, Devices, Variables, and Variable Data — through authenticated endpoints. The API follows REST principles and exchanges data as JSON over HTTPS.
Headers
Section titled “Headers”Every request must include:
| Header | Value |
|---|---|
| Authorization | Bearer <YOUR_API_KEY> |
| Content-Type | application/json |
See Authentication for how to generate a key.
Pagination
Section titled “Pagination”List endpoints accept:
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | Integer | No | Page number. Default: 1. |
| per_page | Integer | No | Records per page. Default: 20. Maximum: 50. |
Response Format
Section titled “Response Format”Every response wraps its payload in data, alongside a meta object:
{ "data": { ... }, "meta": { "success": true, "message": "Request completed successfully" }}| Meta Field | Description |
|---|---|
| success | Whether the request completed successfully. |
| message | Human-readable description of the result. |
| count | (List endpoints only) Total records matching the request. |
| page | (List endpoints only) Current page number. |
| per_page | (List endpoints only) Records returned per page. |
Errors
Section titled “Errors”| Status | Condition |
|---|---|
| 400 Bad Request | Missing or invalid parameters. |
| 401 Unauthorized | Missing, invalid, expired, or deleted API key. |
| 404 Not Found | The requested resource does not exist. |
| 500 Internal Server Error | Unexpected server-side error. |