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

ParameterTypeDescription
idstringThe 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

FieldEffect
archived_atCleared to null
schedule_enabledNot changed (left false from archive — caller re-enables explicitly)
next_run_atNot changed (stays null until you PUT a new cron or flip schedule_enabled)
Event logA station.unarchived entry is written
is_enabledUnchanged

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

CodeDescription
401Invalid or missing API credentials
403API key lacks stations:edit permission
404Station not found