Skip to content

SPDT Endpoints

Renamed from /api/switch

These endpoints were previously served at /api/switch. On SPDT hardware that path is kept as a deprecated alias and still works, but new automation should use /api/spdt. On SP4T hardware /api/switch aliases /api/sp4t instead, carrying the 0–3 range.

GET /api/spdt

Returns the currently routed throw.

Response:

{
  "state": 0
}
State Description
0 RF0
1 RF1

POST /api/spdt

Sets the routed throw.

Request:

{
  "state": 1
}

Response:

{
  "state": 1
}

Errors:

  • 400 — Invalid state value (must be 0 or 1)
  • 500 — Failed to set SPDT state

Example:

# Route COM to RF1
curl -X POST -H "Content-Type: application/json" \
  -d '{"state": 1}' \
  http://<device-ip>/api/spdt

# Route COM to RF0
curl -X POST -H "Content-Type: application/json" \
  -d '{"state": 0}' \
  http://<device-ip>/api/spdt

# Query the current throw
curl http://<device-ip>/api/spdt