Lifecycle
Control PLC runtime state (start, stop, reset). Requires feature flag Lifecycle enabled.
These endpoints control actual PLC hardware. Rate-limited to 1 request per 5 seconds per PLC to prevent accidental rapid cycling.
Start PLC
POST /api/plcs/{plcId}/lifecycle/startPolicy: LifecycleAccess (role = admin, scope ads:lifecycle)
Sets the PLC to Run state.
Stop PLC
POST /api/plcs/{plcId}/lifecycle/stopPolicy: LifecycleAccess
Sets the PLC to Stop state.
Reset PLC
POST /api/plcs/{plcId}/lifecycle/resetPolicy: LifecycleAccess
Resets the PLC.
Rate Limiting
All lifecycle endpoints share a sliding window rate limiter partitioned by plcId. Exceeding the limit returns:
{
"data": null,
"error": { "code": "RATE_LIMITED", "message": "Rate limit exceeded. Try again later." }
}HTTP status 429 with a Retry-After header.