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

Endpoint: Start PLC API_LIFECYCLE_START
status: implemented
component: Lifecycle
method: POST
route: /api/plcs/{plcId}/lifecycle/start
policy: LifecycleAccess

Sets the PLC to Run state. Requires role = admin, scope ads:lifecycle.

Stop PLC

Endpoint: Stop PLC API_LIFECYCLE_STOP
status: implemented
component: Lifecycle
method: POST
route: /api/plcs/{plcId}/lifecycle/stop
policy: LifecycleAccess

Sets the PLC to Stop state.

Reset PLC

Endpoint: Reset PLC API_LIFECYCLE_RESET
status: implemented
component: Lifecycle
method: POST
route: /api/plcs/{plcId}/lifecycle/reset
policy: 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.