Update Station
PUT /api/v1/stations/:id
Updates an existing station definition. Only provided fields are updated.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The station's unique identifier |
Request Body
| Field | Type | Description |
|---|---|---|
name | string | Station name |
description | string | Human-readable description |
conveyor | object | null | The bins the station takes work from ({ "from": … }); null clears it. See Station |
config | object | One JSON object passed to the station's handler; replaces the stored config. See Station |
dependencies | array | Station IDs that must complete first |
is_enabled | boolean | Whether 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
| Code | Description |
|---|---|
400 | Validation error |
401 | Invalid or missing API credentials |
403 | API key lacks stations:edit permission |
404 | Station 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.