API
Skydrix API for operators and integrations.
Use the HTTP API to read configuration, monitor DVB signal state, scan transponders, start or stop streams, and manage user preferences.
Contents
1. API basics
All API methods are served by the Skydrix application itself, usually at the same host and port as the web UI.
Base URL: http://<skydrix-host>:<port>
Content-Type: application/json
When authentication is enabled, API calls require the `skydrix_session` cookie returned by the login endpoint. Static files, the home page, `POST /api/auth/login`, and `GET /api/auth/me` are available without an existing session.
2. Authentication
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/auth/login | Login and receive the session cookie. |
| POST | /api/auth/logout | Invalidate the current session. |
| GET | /api/auth/me | Return current authentication state and user preferences. |
Login request:
{
"username": "admin",
"password": "secret"
}
Successful login returns user data and sets `Set-Cookie: skydrix_session=...`.
3. Configuration API
The configuration API reads and writes the full Skydrix runtime configuration: transponders, channels, output URLs, Softcam servers, HLS settings, notification settings, and monitoring settings.
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/config | Read the complete configuration JSON. |
| PUT | /api/config | Replace the complete configuration JSON. |
| GET | /api/settings/hls | Read current HLS segment settings (`hls_segment_sec`, `hls_segment_count`). |
| PATCH | /api/settings/hls | Update HLS segment settings without replacing full config. Runtime applies changes via `stream.SetHLSConfig`. |
Important behaviour when saving config:
- Transponder ID renames are cascaded to related channels.
- Softcam ID renames are cascaded to channels and `dvb://` input URLs.
- Changed DVB tuning parameters restart affected active streams.
- Changed Softcam credentials are hot-reloaded where possible.
- The response is the final server-reconciled configuration.
4. Channel management API
Use these endpoints when an external panel or automation needs to edit one channel without replacing the full configuration JSON. A channel is addressed by `transponder_id` and `program_number`; in the table below `{tp}` means `transponder_id` and `{pnr}` means `program_number`.
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/channels | List all configured channels. |
| POST | /api/channels | Create one DVB or custom channel. Optional `start_immediately`. |
| GET | /api/channels/{tp}/{pnr} | Read one channel. |
| PATCH | /api/channels/{tp}/{pnr} | Edit name, ID, state, CA, inputs, outputs, schedules, or Pro EPG assignment, including remembered per-provider channel selections. EPG-only changes do not restart the stream. |
| DELETE | /api/channels/{tp}/{pnr} | Stop and remove the channel. |
| POST | /api/channels/{tp}/{pnr}/start | Start this channel using its current config. |
| POST | /api/channels/{tp}/{pnr}/stop | Stop this channel. |
| POST | /api/channels/{tp}/{pnr}/inputs | Add an input URL. Optional `index` controls position. |
| DELETE | /api/channels/{tp}/{pnr}/inputs/{index} | Remove one input URL by zero-based index. |
| POST | /api/channels/{tp}/{pnr}/outputs | Add an output URL. Optional `index` controls position. |
| DELETE | /api/channels/{tp}/{pnr}/outputs/{index} | Remove one output URL by zero-based index. |
| GET | /api/channels/{tp}/{pnr}/preview | Return Live Preview metadata and HLS outputs. |
| POST / GET | /api/channels/{tp}/{pnr}/preview-probe | Run preview diagnostics and return a safe preview URL. |
| POST | /api/channels/{tp}/{pnr}/preview-report | Receive browser preview failure diagnostics. |
| GET | /api/channels/{tp}/{pnr}/preview-hls/index.m3u8 | Preview HLS playlist proxy. Query: `source`, optional `mode`. |
| GET | /api/channels/{tp}/{pnr}/preview-hls/segment/{seq} | Preview HLS segment proxy. Query: `source`, optional `mode`. |
| POST | /api/channels/test-input | Probe one external input URL. |
| POST | /api/channels/media-playlist | Preview recursive `media://` directory contents. |
| POST | /api/channels/scheduled-playlists | List scheduled broadcast playlist files. |
Rename a channel and disable it:
PATCH /api/channels/astra-11550v/501
{
"id": "bbc-news",
"name": "BBC News HD",
"enabled": false
}
Create a custom channel using point API:
POST /api/channels
{
"id": "ext-feed-1",
"name": "External Feed",
"transponder_id": "virt-feed1",
"program_number": 1,
"channel_type": "url",
"input_urls": ["http://origin.example.com/live/index.m3u8"],
"outputs": ["http://0.0.0.0:9010/ext-feed-1/index.m3u8"],
"enabled": true,
"start_immediately": true
}
Assign a Softcam server or switch to a BISS key. These are mutually exclusive: setting one clears the other.
{
"softcam_id": "cam-main",
"biss_key": null
}
{
"biss_key": "1122334455667788",
"softcam_id": null
}
Assign an imported provider channel as this channel's Pro EPG source:
{
"epg_provider_id": "vsetv.com",
"epg_channel_number": "3",
"epg_provider_channels": {
"vsetv.com": "3",
"ntvplus.ru": "42"
}
}
Replace all inputs/outputs at once, or add/remove individual URLs:
{
"input_urls": ["dvb://astra-11550v/501/cam-main", "udp://10.10.10.5:5000"],
"outputs": ["udp://239.10.0.1:5000", "http://0.0.0.0:9001"]
}
POST /api/channels/astra-11550v/501/outputs
{
"url": "http://0.0.0.0:9001/index.m3u8",
"index": 1
}
Pro Channel Schedule is stored in the same channel object as schedules. There is no separate schedule endpoint yet: update schedules with PATCH /api/channels/{tp}/{pnr} or with full PUT /api/config.
- Any active schedule window forces the channel off.
- Overlapping schedules are additive: if any window is active, the channel stays off.
- When no schedule is active, the channel can run only if
enabled=trueand outputs exist. - In non-Pro builds the Schedule UI is locked and the runtime worker is disabled.
One-time schedule example:
PATCH /api/channels/virt-feed1/1
{
"schedules": [
{
"id": "sch-maint-1",
"mode": "one_time",
"enabled": true,
"start_at": 1770000000,
"finish_at": 1770003600
}
]
}
Weekly schedule example. Weekdays use 0..6 for Sun..Sat; 7 is normalized to 0.
{
"schedules": [
{
"id": "sch-nightly",
"mode": "weekly",
"enabled": true,
"weekdays": [1, 2, 3, 4, 5],
"start_hour": 1,
"start_minute": 30,
"finish_hour": 6,
"finish_minute": 0
}
]
}
Monthly/date schedule example. Monthly rules repeat every year; year may be retained as legacy metadata but does not make the rule one-shot.
{
"schedules": [
{
"id": "sch-may-18",
"mode": "monthly",
"enabled": true,
"month": 5,
"month_days": [18],
"start_hour": 2,
"start_minute": 0,
"finish_hour": 4,
"finish_minute": 30
}
]
}
If an edited channel is currently active, runtime-affecting changes restart it automatically. Setting `enabled:true` starts it when outputs are configured; setting `enabled:false` or removing all outputs stops it.
Custom-channel helper requests:
POST /api/channels/test-input
{
"url": "https://example.com/live/index.m3u8"
}
POST /api/channels/media-playlist
{
"directory": "/media/videos"
}
POST /api/channels/scheduled-playlists
{
"directory": "/media/playlists"
}
5. Transponder management API
Use these endpoints when an external panel or automation needs to manage one DVB transponder without replacing the full configuration JSON. A transponder is addressed by its `id`.
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/transponders | List all configured transponders. |
| POST | /api/transponders | Create a transponder. |
| GET | /api/transponders/{id} | Read one transponder. |
| PATCH | /api/transponders/{id} | Edit tune settings, lnb_power_mode, satellite metadata, or hide. |
| DELETE | /api/transponders/{id} | Remove transponder and bound channels. |
| POST | /api/transponders/{id}/enable | Enable and start configured channels. |
| POST | /api/transponders/{id}/disable | Disable and stop active channels. |
| POST | /api/transponders/{id}/tune | Tune adapter with stored parameters. |
| POST | /api/transponders/{id}/scan | Scan and return discovered services. |
| GET | /api/transponders/{id}/signal | Read signal/SNR/lock and LNB state. |
| GET | /api/transponders/{id}/lnb-state | Read cached LNB/scan state. |
| GET | /api/transponders/{id}/channels | List channels bound to this transponder. |
Create or patch a transponder:
{
"id": "astra-11550v",
"name": "Astra 11550 V",
"enabled": true,
"adapter": 0,
"frequency": 11550,
"polarization": "V",
"symbol_rate": 27500,
"lof1": 9750,
"lof2": 10600,
"slof": 11700,
"lnb_power_mode": "auto",
"dvb_type": "DVB-S2",
"fec": "3/4",
"modulation": "8PSK"
}
Renaming a transponder cascades to related channels and matching `dvb://old-id/...` input URLs. Changing tune parameters restarts active pipelines for that transponder.
6. Hardware and signal
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/adapters | List available DVB adapters from `/dev/dvb/adapterN`. |
| GET | /api/signal?adapter=N | Read live signal, SNR, lock bits, 22 kHz tone state, and LNB power for adapter `N`. |
| GET | /api/lnb-state?adapter=N | Read cached adapter scan state without opening the hardware device. |
| POST | /api/tune | Tune an adapter to a transponder without starting a stream. |
| POST | /api/scan | Scan a transponder and return discovered services/channels. Send optional transponder_id to scan PAT/SDT/PMT from an already active tune without interrupting its channels. |
| GET | /api/dvb-tuners | Return the detected DVB hardware map and saved visual order. Pro build required. |
| POST | /api/dvb-tuners/layout | Save the current visual order of DVB cards. Pro build required. |
| POST | /api/dvb-tuners/layout/reset | Restore the deterministic default DVB card order. Pro build required. |
Legacy /api/debug/dvb-tuners, /api/debug/dvb-tuners/layout, /api/debug/dvb-tuners/layout/reset, /api/debug/dvb-tuners/mapping, and /api/debug/dvb-tuners/mapping/reset routes remain compatibility aliases for the canonical DVB tuner endpoints.
`/api/tune` and `/api/scan` use the same tune parameters:
{
"adapter": 0,
"frequency": 11550,
"polarization": "V",
"symbol_rate": 27500,
"lof1": 9750,
"lof2": 10600,
"slof": 11700,
"lnb_power_mode": "auto",
"dvb_type": "DVB-S2",
"fec": "3/4",
"modulation": "8PSK"
}
lnb_power_mode is auto by default. Set it to external only for a passive shared coax feed powered and band-selected by another receiver; Skydrix then disables its local LNB supply and does not control the 22 kHz tone. When /api/scan receives the ID of a transponder already active on the requested adapter, it reads service tables without retuning. Otherwise it temporarily pauses active pipelines on that adapter. The HTTP timeout is 120 seconds.
7. Streaming control
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/stream/start | Start one configured channel. |
| POST | /api/stream/stop | Stop one configured channel. |
| GET | /api/stream/status | Read status for all active or recently registered streams. |
Start or stop request:
{
"transponder_id": "astra-11550v",
"channel_pnr": 501
}
Status response contains stream keys such as `astra-11550v:501` and values with `active`, `outputs`, `started`, `bitrate_kbps`, `scrambled`, `errors`, and `active_input_url`.
Supported output URL families include UDP, RTP, HTTP MPEG-TS, and HLS:
udp://239.10.0.1:5000
rtp://239.10.0.1:5000
http://0.0.0.0:9001
http://0.0.0.0:9001/index.m3u8
8. Operational tools
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/parse-url | Fetch a satellite information page and extract transponder data. |
| POST | /api/softcam/test | Test Newcamd/Softcam connection settings. |
| POST | /api/stats/test | Send a test point to configured InfluxDB monitoring. |
| GET | /api/sunoutage | Return Pro flag, Sun Outage settings, merged satellite list, and catalog freshness fields. |
| POST | /api/sunoutage | Run Sun Outage calculation (Pro build required). Validation/calculation errors are returned as structured JSON (`ok=false`, `error_code`, `error`) with user-friendly messages. |
| GET | /api/satellites | Return local satellite catalog snapshot. |
| GET | /api/satellites/search?q=... | Search local satellite catalog by name, alias, or NORAD ID. |
| POST | /api/satellites/update | Update local satellite catalog from the configured upstream source. Admin only when auth is enabled. |
| GET | /api/satellite-autoscan/status | Pro-only daily transponder/channel auto-scan status, including per-transponder channel additions, disabled channels, and scan errors. |
| GET | /api/epg | Return Pro EPG settings, provider status, and periodic worker state. |
| PUT | /api/epg | Validate, apply, and persist EPG settings, including per-provider time_offset and optional FTP publication of the generated epg.xml. Admin only when authentication is enabled. |
| GET | /api/epg/status | Return cached per-channel EPG coverage states: over_24h, under_24h, current_missing, or unassigned. |
| POST | /api/epg/refresh | Refresh one provider channel catalog through the single-threaded importer. |
| GET | /api/epg/channels?provider=...&q=...&limit=500 | Search stored provider channels. Results are bounded to 5000 rows. |
| GET | /api/epg/programmes?provider=...&channel=... | Pro-only: return the stored programme schedule for one provider channel. |
| POST | /api/epg/programmes/download | Pro-only: download and atomically replace the stored schedule for one imported provider channel. Admin only when authentication is enabled. |
| POST | /api/epg/programmes/refresh | Pro-only: sequentially refresh programmes for every unique provider/channel pair currently assigned to a Skydrix channel. Admin only when authentication is enabled. |
| POST | /api/epg/programmes/clear | Pro-only: atomically delete downloaded schedules for the supplied provider/channel selections while preserving channel assignments. Admin only when authentication is enabled. |
| GET | /api/client-version | Return the current Skydrix client version. |
| GET | /api/license-state | Return UI-safe license state: status, mode, trial, and expired grace flags. |
| GET | /api/update-status | Return cached update-check state. Add ?refresh=1 to perform an immediate check before returning the state. |
| GET/POST | /api/debug | Check or update runtime debug logging options. |
Parse satellite URL request:
{
"url": "https://example.com/satellite/transponders"
}
Softcam test request:
{
"host": "127.0.0.1",
"port": 15000,
"login": "user",
"password": "pass",
"des_key": "01 02 03 04 05 06 07 08 09 10 11 12 13 14"
}
EPG provider refresh request:
{
"provider_id": "vsetv.com"
}
Each provider may define an individual time offset applied when programme start/end times are returned, including schedules already stored in SQLite:
{
"providers": [
{
"id": "vsetv.com",
"enabled": true,
"region": "1",
"time_offset": "+04:00"
}
]
}
Optional FTP publication settings. A blank password preserves the previously stored secret; clearing host and username disables FTP upload:
{
"ftp": {
"protocol": "ftp",
"host": "epg.example.com:21",
"directory": "/xmltv",
"username": "publisher",
"password": "secret"
}
}
The generated document is uploaded as epg.xml after a successful local generation. The optional directory selects the FTP destination directory and defaults to /. The password is stored separately in /etc/skydrix/epg/ftp_credentials.json with mode 0600 and is not returned by the API.
Download one provider channel schedule:
{
"provider_id": "vsetv.com",
"channel_number": "3"
}
Automatic EPG updates are Pro-only and disabled until the schedule is saved. The backend accepts selected weekdays (0 Sunday through 6 Saturday), hour, minute, and an IANA timezone. A scheduled cycle refreshes every enabled provider channel catalog and then every EPG assignment for that provider through one sequential runtime pipeline. Provider files are read from /etc/skydrix/epg; channel snapshots and import history are stored in /etc/skydrix/epg/epg.db.
9. Users and preferences
User management endpoints are intended for installations with Skydrix authentication enabled. Admin-only methods require an admin session.
| Method | Endpoint | Purpose |
|---|---|---|
| PUT | /api/auth/prefs | Save preferences for the current user. |
| GET | /api/auth/users | List users. Admin only. |
| POST | /api/auth/users | Create a user. The first user can bootstrap the first admin. Supports per-user Telegram settings. |
| PUT | /api/auth/users?username=X | Update password, role, language, UI theme, or Telegram settings. Admin only. |
| DELETE | /api/auth/users?username=X | Delete a user. Admin only. |
| POST | /api/auth/telegram-test | Send a `Test` Telegram message using submitted settings. Admin only. |
Preferences include visual theme, language, card zoom, saved panel width, and Telegram settings:
{
"theme": "dark",
"ui_theme": "aurora",
"card_scale": 1.0,
"resizer_left_px": 420,
"lang": "en",
"telegram": {
"chat_id": "-1001234567890",
"bot_token": "bot123456789:example",
"use_custom_url": false,
"use_custom_bot": false
}
}
For a custom Telegram gateway, send `use_custom_url=true`, `custom_url`, `use_custom_bot=true`, and `custom_bot_path`. Custom URL send/test uses insecure TLS verification, similar to `curl --insecure`.
{
"telegram": {
"chat_id": "-1001234567890",
"use_custom_url": true,
"custom_url": "freegate.yourserver.com",
"use_custom_bot": true,
"custom_bot_path": "/telegram/Bot"
}
}
10. Errors and status codes
Most successful write operations return `{"ok":true}`. Validation and operational failures return a non-2xx status with either plain text or a JSON object containing `error`.
| Status | Meaning |
|---|---|
| 400 | Invalid request body, missing parameter, invalid adapter, or invalid channel reference. |
| 401 | No valid session cookie when authentication is enabled. |
| 403 | Authenticated user is not allowed to perform an admin action. |
| 404 | Requested stream/session/user was not found. |
| 502 | Hardware, scan, parser, or external service operation failed. |
| 504 | Transponder scan timed out. |