SP4T Endpoints
These endpoints are available on SP4T switch hardware. States are zero-based and there is no "all open" state — exactly one throw is routed at all times.
GET /api/sp4t
Returns the currently routed throw.
Response:
| State | Description |
|---|---|
0 |
COM routed to RF0 |
1 |
COM routed to RF1 |
2 |
COM routed to RF2 |
3 |
COM routed to RF3 |
POST /api/sp4t
Sets the routed throw.
Request:
Response:
Errors:
400— Invalid state value (must be0–3)500— Failed to set SP4T state
Example:
# Route COM to RF2
curl -X POST -H "Content-Type: application/json" \
-d '{"state": 2}' \
http://<device-ip>/api/sp4t
# Query the current throw
curl http://<device-ip>/api/sp4t
Deprecated /api/switch Alias
On SP4T hardware, /api/switch is a deprecated alias for /api/sp4t and
carries the same 0–3 state range. Existing bench scripts and saved automation
that predate the rename keep working; new automation should use /api/sp4t.
For the two-throw variant see SPDT Endpoints.