The API¶
Everything the dashboard shows and does goes through WPSD Palisade’s API, and the same API is open to your own programs: a club website showing who’s on the air, a home-automation panel, a script that switches profiles.
The API documentation on your WPSD device¶
Your WPSD device documents its own API, always matching the version it runs: open http://wpsd.local/api/docs/ (with your WPSD device’s name or address). It lists every endpoint, what it takes and what it returns, and lets you try them from the browser.
All endpoints are under /api/v1/.
Who can use what¶
Endpoints |
Who |
|---|---|
The live data the dashboard shows: Last Heard and call history ( |
Anyone on your network, without logging in, like the dashboard itself. With Private dashboard on (see Security), only after logging in. |
Every change, and everything else (settings, profiles, keys, logs) |
Only you, logged in |
Settings read without logging in |
Passwords and keys are blanked |
The API answers only on your network: it isn’t reachable from the internet unless you open your router to it, which you shouldn’t.
Reading Last Heard from another computer¶
The calls the dashboard lists, newest last:
curl http://wpsd.local/api/v1/mqtt/lastheard
Each call has its mode, callsign, target (talkgroup or reflector), duration, BER and more. For the stored history, newest first, with filters by callsign, mode and time, use /api/v1/mqtt/history; /api/v1/mqtt/history/export gives it as CSV.
To follow calls as they happen, /api/v1/mqtt/stream is a Server-Sent Events stream of calls, links, mode and status changes: the same feed the dashboard’s Live panel uses.
Logging in from a script¶
Endpoints that need the owner’s login take the dashboard’s session cookie. Log in once with your owner password, keep the cookie, and send it with each request:
curl -c cookies.txt -H 'Content-Type: application/json' \
-d '{"password":"your owner password"}' http://wpsd.local/api/v1/auth/login
curl -b cookies.txt http://wpsd.local/api/v1/profiles
Five wrong passwords from one address lock that address out for a minute, then longer each time.
Warning
A script holding your owner password can change anything on the WPSD device. Keep it on a computer you trust, and don’t put the password in a script you share.