API Overview
OmniLux exposes a REST API for all operations. The web UI, mobile apps, and TV apps all use this same API.
Base URL
http://your-server:4000/apiAll endpoints are prefixed with /api.
Content type
All request and response bodies use JSON:
Content-Type: application/jsonAuthentication
Most endpoints require a Bearer token. See Authentication for details.
Authorization: Bearer <token>Pagination
List endpoints support pagination via query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Maximum items per page |
offset | number | 0 | Number of items to skip |
Response includes pagination metadata:
json
{
"items": [...],
"total": 150,
"limit": 50,
"offset": 0
}Filtering and sorting
List endpoints support filtering and sorting:
| Parameter | Type | Description |
|---|---|---|
sort | string | Field to sort by (e.g., createdAt, title) |
order | string | Sort direction: asc or desc |
search | string | Full-text search query |
Additional filters vary per endpoint (e.g., status, mediaType, category).
Response format
Successful responses return the data directly:
json
{
"id": 1,
"title": "Example",
...
}Error responses follow a standard format:
json
{
"error": "Human-readable error message",
"code": "MACHINE_READABLE_CODE",
"plugin": "plugin-name"
}See Errors for details.
Rate limiting
API endpoints are rate-limited. See Errors for rate limit headers and behavior.