Archive Station
POST /api/v1/stations/:id/archive
Mark a station as archived. Archived stations are hidden from the default list response, blocked from execution (scheduler skips them; POST /run rejects them), and excluded from the pull --all flow of CLI tools — but every work record and supporting document stays intact. Use archive when you want to retire a station without losing audit history; use delete when the data should go too.
This endpoint exists only on the canonical /stations/* surface. There is no /stations/* alias.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The station's unique identifier or short_code |
Example Request
curl -X POST "https://orchestrator.assemblyline.sh/api/v1/stations/st_abc123/archive" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Response
{
"data": {
"id": "st_abc123",
"archived_at": "2026-06-17T05:12:34.000Z"
}
}
If the station is already archived, the existing archived_at is returned unchanged (idempotent).
Side Effects
The archive transition is more than a flag — it forces consistent state across related fields:
| Field | Effect |
|---|---|
archived_at | Set to current timestamp |
schedule_enabled | Forced to false (so unarchive doesn't surprise-fire the cron) |
next_run_at | Cleared to null |
| Event log | A station.archived entry is written |
is_enabled | Unchanged — independent of archive state |
What Archive Blocks
POST /api/v1/stations/:id/runreturns400 VALIDATION_ERRORwith messageStation is archived- The scheduled-station job (
checkScheduledStations) skips archived stations even ifschedule_enabledwere somehow true GET /api/v1/stations(list) excludes archived rows unless?include_archived=trueis passed
What Archive Preserves
- All
work_recordsfor the station — queryable viaGET /api/v1/work-records?station=<id> - All
supporting_documentsattached to those work records - All
process_watchers(notification subscriptions) - The station definition itself, including its
config,tags, and timestamps
Reversing the Action
See Unarchive. Unarchive clears archived_at but does not re-enable the schedule — that is opted in explicitly via PUT /api/v1/stations/:id { "schedule_enabled": true }.
Errors
| Code | Description |
|---|---|
401 | Invalid or missing API credentials |
403 | API key lacks stations:edit permission |
404 | Station not found |