Client libraries
A client library wraps the management API so your own code can read stats, list listeners, disconnect a source, ban an address or update a track title without writing HTTP calls by hand. Each library returns typed objects and raises a typed error for every API error code.
| Language | Package | Status |
|---|---|---|
| PHP | quikcast/quikcast | Covers the whole management API, source metadata updates, health and metrics |
More languages may follow. Until then, any language can call the management API directly: it is plain HTTP with a Bearer token and JSON responses.
What every client needs
The admin address. The management API listens on
admin_listen, which is loopback by default. Run your code on the same host, or reach it through a private proxy, a VPN or an SSH tunnel. Allowing remote access is covered in Remote management.A management token. Enable
[management]and read the token from the secret file. Keep it out of source code:shexport QUIKCAST_ADMIN_URL='http://127.0.0.1:9090' export QUIKCAST_TOKEN="$(cat secrets/management-token)"Source credentials, only for metadata updates. Changing the "now playing" title is a source operation on the streaming port. It uses the mount's encoder username and password, not the management token.
What a client covers
| Area | Operations |
|---|---|
| Server | Info, capabilities and limits, drain |
| Stats and history | Counters, per-minute listener history |
| Mounts and sources | List and inspect mounts, inspect or disconnect a source |
| Listeners | Page through a mount's listeners, disconnect one |
| Relays | List, inspect, restart, stop |
| HLS | Streams, renditions, directory-stream listener sessions |
| Bans and revocations | Ban an address or range, revoke one signed link |
| Source metadata | Update artist and title |
| Monitoring | Health probes and Prometheus text |
Versions
A client is released separately from the server and reads only the fields it knows, so an older client keeps working against a newer server. A new server feature may need a newer client. Each library's changelog says which server version it was checked against.