Skip to content
API Reference

API Reference

All PLC-scoped endpoints use the prefix /api/plcs/{plcId}/ where plcId is the configured alias (e.g., Line1, MyPLC).

Response Envelope

Every response uses a standard envelope:

// Success
{ "data": { ... }, "error": null }

// Error
{ "data": null, "error": { "code": "ADS_TIMEOUT", "message": "..." } }

Error Codes

CodeHTTP StatusDescription
SYMBOL_NOT_FOUND404PLC symbol does not exist
PLC_NOT_FOUND404PLC alias not configured
PLC_UNAVAILABLE503PLC is not connected
ADS_TIMEOUT504ADS operation timed out
ADS_ERROR502Generic ADS protocol error
TYPE_MISMATCH400Value type doesn’t match symbol type
BATCH_LIMIT_EXCEEDED400Batch request exceeds 100 symbols
SUBSCRIPTION_LIMIT_EXCEEDED400Exceeded max symbols per client
RATE_LIMITED429Lifecycle rate limit hit
FEATURE_DISABLED404Feature slice is disabled
UNAUTHORIZED401Missing or invalid JWT
FORBIDDEN403Insufficient role or scope
PLC_ACCESS_DENIED403plc_access claim denies this PLC
MASTER_NOT_FOUND404EtherCAT master ID not found
SLAVE_NOT_FOUND404EtherCAT slave address not found

Symbol Path Format

TwinCAT dot notation: MAIN.nCounter, MAIN.stMotor.bEnabled, GVL.arr[0]

Array indices with brackets must be URL-encoded in path segments: MAIN.arr%5B0%5D

System Endpoints

GET  /api/plcs                   List all PLCs + connection status
GET  /api/plcs/{plcId}/status    Detailed status for one PLC
GET  /health/live                Liveness probe
GET  /health/ready               Readiness probe (PLC connectivity)
GET  /openapi/v1.json            OpenAPI spec
GET  /swagger                    Scalar API UI (Development only)