Pagination and Errors
Every list endpoint paginates the same way and every non-2xx response wraps the same envelope. This page documents those shared conventions so per-resource pages can stay focused on resource-specific fields.
Pagination
List endpoints use a 1-based page index plus a page size:
| Parameter | Type | Default | Notes |
|---|---|---|---|
page | integer | 1 | Page index, starting at 1. |
pageSize | integer | 500 | Number of rows per page. |
The response is wrapped in the standard {rows, pagination} envelope:
{
"data": {
"rows": [
{ "id": 12, "name": "..." },
{ "id": 13, "name": "..." }
],
"pagination": {
"page": 1,
"pageSize": 500,
"total": 18,
"totalPages": 1
}
}
}
To iterate through every row, increment page until page > totalPages.
Response envelope
Every API response — success and failure alike — wraps its payload in a standard envelope. On success, the resource (or list envelope above) is placed under data. On failure, the envelope carries the error code, the human-readable message and the request id.
{
"success": false,
"code": "APIf006",
"message": "Field username exceeds the maximum length of 30 characters.",
"data": ["username", 30],
"request_id": "<request-id>"
}
| Field | Notes |
|---|---|
code | Catalogued error code (see below). Stable across releases. |
message | Human-readable English. Phrasing may evolve. |
data | Optional substitution values referenced from message (for example [fieldName, maxLength]). |
request_id | Correlation identifier; also echoed in the X-Request-Id response header. |
Error catalogue
The platform exposes a stable, prefix-based error catalogue. Codes are emitted by the server in the same deployment and are stable across releases — consult the OpenAPI spec for the exact per-operation reference.
| Prefix | Family | Examples |
|---|---|---|
SYSf | System / generic. | SYSf001 Invalid request, SYSf014 The backend responded with an error. |
SECf | Authentication, authorisation and account state. | SECf004 Duplicate username, SECf005 Not logged in, SECf013 Not allowed, SECf017 Account locked. |
APIf | Validation, parameter and contract errors. | APIf001 Wrong parameters, APIf003 Field not found, APIf050 Record already exists. |
APIf1xx | Device / encoder errors. | APIf100 Device not found. |
APIf5xx | Live stream errors. | APIf500 Live stream configuration not found, APIf524 Max live streams reached. |
APIf6xx | Destination errors. | APIf650 Destination not found, APIf651 Destination name not unique. |
APIf7xx | Encoding errors. | APIf700 Encoding not found, APIf710 Encoding in use. |
APIf8xx | Channel errors. | APIf800 Channel not found, APIf820 Channel in use. |
CUTf | Recordings editor / cuts. | CUTf006 No cuts done with the selected intervals. |
DRMf | DRM workflow. | DRMf011 DRM provider not selected, DRMf013 Provider disabled. |
Branch on the code for coarse handling; consult per-resource pages for the codes a given operation can produce. Legacy uppercase variants (APIF517, APIF519, SYSF008) still appear in older payloads and are equivalent to the lowercase family.
HTTP status codes
| Status | Meaning |
|---|---|
200 OK | Success with body. |
400 Bad Request | Malformed request, validation error, missing required field. |
401 Unauthorized | Missing or invalid credentials (SECf005, SECf014, SECf021). |
403 Forbidden | Authenticated but not permitted (SECf013). |
404 Not Found | Resource does not exist. |
409 Conflict | State conflict or duplicate (APIf050, duplicate name). |
422 Unprocessable Entity | Semantic validation error. |
429 Too Many Requests | Rate limit exceeded. Honor Retry-After. |
500 Internal Server Error | Unhandled server fault. Retriable. |
502 Bad Gateway | Upstream unreachable. |
503 Service Unavailable | Server overloaded or restarting. |
504 Gateway Timeout | Upstream timed out. |
Request id
Every response includes X-Request-Id and echoes the same value in request_id on failure. Operators include this id in support tickets so the platform team can pull the matching server-side log.
X-Request-Id: <request-id>
Retry guidance
Retry only on transient failures:
| Status | Retry? | Backoff |
|---|---|---|
2xx | Never. | n/a |
4xx (400, 401, 403, 404, 409, 422) | Never. Fix the request or the state, then send a new one. | n/a |
429 | Yes. | Honour Retry-After. If absent, start at 1 s and double up to 60 s. |
5xx | Yes. | Exponential backoff: 1 s, 2 s, 4 s, 8 s, 16 s, 32 s, capped at 60 s. Stop after 6 attempts. |
When retrying mutations, send the same Idempotency-Key so the server can deduplicate. See API Overview for the idempotency contract.
FAQ
data.rows; clients that iterate read data.pagination too.data. Branch on code for coarse handling and on data for specific recovery paths.