Unarchive Station
POST /api/v1/stations/:id/unarchive
Undoes archive — clears archived_at, restoring the station to the default list, allowing executions again. Does not re-enable the schedule — if the station was scheduled before archive, you must opt back in explicitly via PUT /api/v1/stations/:id.
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/unarchive" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Response
{
"data": {
"id": "st_abc123",
"archived_at": null
}
}
If the station is not currently archived, the response is the same (idempotent no-op).
Side Effects
| Field | Effect |
|---|---|
archived_at | Cleared to null |
schedule_enabled | Not changed (left false from archive — caller re-enables explicitly) |
next_run_at | Not changed (stays null until you PUT a new cron or flip schedule_enabled) |
| Event log | A station.unarchived entry is written |
is_enabled | Unchanged |
Re-enabling the Schedule
The conservative default — leaving the schedule disabled — exists so unarchive doesn't surprise-fire a cron. To resume scheduled execution after unarchiving:
curl -X PUT "https://orchestrator.assemblyline.sh/api/v1/stations/st_abc123" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "schedule_enabled": true }'
The orchestrator recomputes next_run_at from the existing schedule_cron and schedule_timezone.
Errors
| Code | Description |
|---|---|
401 | Invalid or missing API credentials |
403 | API key lacks stations:edit permission |
404 | Station not found |