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.

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

MethodEndpointPurpose
POST/api/auth/loginLogin and receive the session cookie.
POST/api/auth/logoutInvalidate the current session.
GET/api/auth/meReturn 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.

MethodEndpointPurpose
GET/api/configRead the complete configuration JSON.
PUT/api/configReplace the complete configuration JSON.
GET/api/settings/hlsRead current HLS segment settings (`hls_segment_sec`, `hls_segment_count`).
PATCH/api/settings/hlsUpdate 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`.

MethodEndpointPurpose
GET/api/channelsList all configured channels.
POST/api/channelsCreate 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}/startStart this channel using its current config.
POST/api/channels/{tp}/{pnr}/stopStop this channel.
POST/api/channels/{tp}/{pnr}/inputsAdd 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}/outputsAdd 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}/previewReturn Live Preview metadata and HLS outputs.
POST / GET/api/channels/{tp}/{pnr}/preview-probeRun preview diagnostics and return a safe preview URL.
POST/api/channels/{tp}/{pnr}/preview-reportReceive browser preview failure diagnostics.
GET/api/channels/{tp}/{pnr}/preview-hls/index.m3u8Preview 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-inputProbe one external input URL.
POST/api/channels/media-playlistPreview recursive `media://` directory contents.
POST/api/channels/scheduled-playlistsList 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=true and 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`.

MethodEndpointPurpose
GET/api/transpondersList all configured transponders.
POST/api/transpondersCreate 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}/enableEnable and start configured channels.
POST/api/transponders/{id}/disableDisable and stop active channels.
POST/api/transponders/{id}/tuneTune adapter with stored parameters.
POST/api/transponders/{id}/scanScan and return discovered services.
GET/api/transponders/{id}/signalRead signal/SNR/lock and LNB state.
GET/api/transponders/{id}/lnb-stateRead cached LNB/scan state.
GET/api/transponders/{id}/channelsList 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

MethodEndpointPurpose
GET/api/adaptersList available DVB adapters from `/dev/dvb/adapterN`.
GET/api/signal?adapter=NRead live signal, SNR, lock bits, 22 kHz tone state, and LNB power for adapter `N`.
GET/api/lnb-state?adapter=NRead cached adapter scan state without opening the hardware device.
POST/api/tuneTune an adapter to a transponder without starting a stream.
POST/api/scanScan 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-tunersReturn the detected DVB hardware map and saved visual order. Pro build required.
POST/api/dvb-tuners/layoutSave the current visual order of DVB cards. Pro build required.
POST/api/dvb-tuners/layout/resetRestore 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

MethodEndpointPurpose
POST/api/stream/startStart one configured channel.
POST/api/stream/stopStop one configured channel.
GET/api/stream/statusRead 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

MethodEndpointPurpose
POST/api/parse-urlFetch a satellite information page and extract transponder data.
POST/api/softcam/testTest Newcamd/Softcam connection settings.
POST/api/stats/testSend a test point to configured InfluxDB monitoring.
GET/api/sunoutageReturn Pro flag, Sun Outage settings, merged satellite list, and catalog freshness fields.
POST/api/sunoutageRun 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/satellitesReturn local satellite catalog snapshot.
GET/api/satellites/search?q=...Search local satellite catalog by name, alias, or NORAD ID.
POST/api/satellites/updateUpdate local satellite catalog from the configured upstream source. Admin only when auth is enabled.
GET/api/satellite-autoscan/statusPro-only daily transponder/channel auto-scan status, including per-transponder channel additions, disabled channels, and scan errors.
GET/api/epgReturn Pro EPG settings, provider status, and periodic worker state.
PUT/api/epgValidate, 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/statusReturn cached per-channel EPG coverage states: over_24h, under_24h, current_missing, or unassigned.
POST/api/epg/refreshRefresh one provider channel catalog through the single-threaded importer.
GET/api/epg/channels?provider=...&q=...&limit=500Search 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/downloadPro-only: download and atomically replace the stored schedule for one imported provider channel. Admin only when authentication is enabled.
POST/api/epg/programmes/refreshPro-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/clearPro-only: atomically delete downloaded schedules for the supplied provider/channel selections while preserving channel assignments. Admin only when authentication is enabled.
GET/api/client-versionReturn the current Skydrix client version.
GET/api/license-stateReturn UI-safe license state: status, mode, trial, and expired grace flags.
GET/api/update-statusReturn cached update-check state. Add ?refresh=1 to perform an immediate check before returning the state.
GET/POST/api/debugCheck 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.

MethodEndpointPurpose
PUT/api/auth/prefsSave preferences for the current user.
GET/api/auth/usersList users. Admin only.
POST/api/auth/usersCreate a user. The first user can bootstrap the first admin. Supports per-user Telegram settings.
PUT/api/auth/users?username=XUpdate password, role, language, UI theme, or Telegram settings. Admin only.
DELETE/api/auth/users?username=XDelete a user. Admin only.
POST/api/auth/telegram-testSend 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`.

StatusMeaning
400Invalid request body, missing parameter, invalid adapter, or invalid channel reference.
401No valid session cookie when authentication is enabled.
403Authenticated user is not allowed to perform an admin action.
404Requested stream/session/user was not found.
502Hardware, scan, parser, or external service operation failed.
504Transponder scan timed out.