Update Station

PUT /api/v1/stations/:id

Updates an existing station definition. Only provided fields are updated.

Path Parameters

ParameterTypeDescription
idstringThe station's unique identifier

Request Body

FieldTypeDescription
namestringStation name
descriptionstringHuman-readable description
conveyorobject | nullThe bins the station takes work from ({ "from": … }); null clears it. See Station
configobjectOne JSON object passed to the station's handler; replaces the stored config. See Station
dependenciesarrayStation IDs that must complete first
is_enabledbooleanWhether station is enabled

Example Request

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 '{
    "description": "Validate invoice format, amounts and tax",
    "config": { "source": "erpnext", "check_tax": true }
  }'

Response

{
  "data": {
    "id": "st_abc123",
    "short_code": "IV1",
    "line": "IV",
    "name": "validate_invoice",
    "description": "Validate invoice format, amounts and tax",
    "config": { "source": "erpnext", "check_tax": true },
    "conveyor": { "from": "IV0/output" },
    "dependencies": [],
    "is_enabled": true,
    "created_at": "2024-01-10T08:00:00Z"
  }
}

Disable a Station

Prevent a station from being executed:

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 '{ "is_enabled": false }'

Config Replacement

config is replaced whole, not merged. Send every key you want to keep. A run already queued keeps the config it was queued with.

Errors

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

Validation Error Responses

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "config must be an object"
  }
}

A request that still sends steps is refused: a station has one config.