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

MethodEndpointDescription
GET/api/v1/work-recordsList all work records
GET/api/v1/work-records/:idGet a single work record
POST/api/v1/work-recordsCreate (record a run without queuing it)
GET/api/v1/work-records/:id/tagsGet work record tags
PUT/api/v1/work-records/:id/tagsSet work record tags

Required Permissions

ActionPermission
List/Getwork_records:read
Creatework_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

  1. Run a station with POST /api/v1/stations/:id/run
  2. Work record is created with status pending
  3. Orchestrator freezes the config and location on it and queues it
  4. Status changes to running when a factory session at the line's location claims it
  5. The factory session runs the station's handler and reports its output
  6. Status becomes completed or failed

See Also