List Work Records

GET /api/v1/work-records

Returns a paginated list of work records in your organization.

Query Parameters

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber100Items per page (max 500)
fieldsstringallComma-separated field names
stationstring-Filter by station ID
stationstring-Filter by station — accepts a station id or a short_code (e.g. EM0)
linestring-Filter by line — every record from any station on that line (e.g. VM covers VM0..VM5)
statusstring-Filter by status
tagstring-Filter by tag name

station and line combine as an intersection: ?line=VM&station=VM3 returns only VM3's records, and a station that isn't on the given line matches nothing. An unknown station or line returns an empty page rather than an error.

Example Request

curl -X GET "https://orchestrator.assemblyline.sh/api/v1/work-records?status=completed&limit=10" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Response

{
  "data": [
    {
      "id": "wr_abc123def",
      "station": "st_def456",
      "status": "completed",
      "output": { "done_count": 3, "failed_count": 0 },
      "started_at": "2024-01-15T10:30:00Z",
      "completed_at": "2024-01-15T10:30:45Z",
      "performed_by": "api_key_name",
      "error": null,
      "created_at": "2024-01-15T10:30:00Z"
    },
    {
      "id": "wr_ghi456jkl",
      "station": "st_def456",
      "status": "completed",
      "output": {...},
      "started_at": "2024-01-15T09:15:00Z",
      "completed_at": "2024-01-15T09:15:30Z",
      "performed_by": "api_key_name",
      "error": null,
      "created_at": "2024-01-15T09:15:00Z"
    }
  ],
  "page_context": {
    "count": 2,
    "page": 1,
    "per_page": 10,
    "total": 156,
    "has_more": true
  }
}

Filtering Examples

By Station

Get all executions of a specific station:

curl -X GET "https://orchestrator.assemblyline.sh/api/v1/work-records?station=st_def456" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

By Status

Get failed executions:

curl -X GET "https://orchestrator.assemblyline.sh/api/v1/work-records?status=failed" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Get currently running executions:

curl -X GET "https://orchestrator.assemblyline.sh/api/v1/work-records?status=running" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

By Tag

Get work records that have a specific tag:

curl -X GET "https://orchestrator.assemblyline.sh/api/v1/work-records?tag=reviewed" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Combined Filters

curl -X GET "https://orchestrator.assemblyline.sh/api/v1/work-records?station=EX1&status=completed" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Field Selection

Request only specific fields (useful when you don't need full output):

curl -X GET "https://orchestrator.assemblyline.sh/api/v1/work-records?fields=id,status,created_at" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Errors

CodeDescription
401Invalid or missing API credentials
403API key lacks work_records:read permission