Work Records API
Work Records track station runs. Query them to monitor status and results; trigger a run with POST /api/v1/stations/:id/run.
Base URL
https://orchestrator.assemblyline.sh/api/v1/work-records
Endpoints
Required Permissions
| Action | Permission |
|---|
| List/Get | work_records:read |
| Create | work_records:create |
Quick Example
Trigger Station Execution
curl -X POST "https://orchestrator.assemblyline.sh/api/v1/stations/st_def456/run" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Check Execution Status
curl -X GET "https://orchestrator.assemblyline.sh/api/v1/work-records/wr_xyz789" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
List Recent Executions
curl -X GET "https://orchestrator.assemblyline.sh/api/v1/work-records?station=EX1" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Execution Flow
- Run a station with
POST /api/v1/stations/:id/run
- Work record is created with status
pending
- Orchestrator freezes the config and location on it and queues it
- Status changes to
running when a factory session at the line's location claims it
- The factory session runs the station's handler and reports its output
- Status becomes
completed or failed
See Also
- Work Record Object — full field reference
- Work Record Object — statuses, retries and how a run is queued and claimed
- Station Object — understand station definitions