Station Tags

Manage tags associated with a station. Tags are returned as part of station GET responses and can be managed independently via these endpoints.

Get Station Tags

GET /api/v1/stations/:id/tags

Returns all tags associated with a station.

Path Parameters

ParameterTypeDescription
idstringThe station's unique identifier

Example Request

curl -X GET "https://orchestrator.assemblyline.sh/api/v1/stations/st_abc123/tags" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Response

{
  "data": [
    {
      "id": "tag_abc123",
      "name": "monthly",
      "color": "#0075ca"
    },
    {
      "id": "tag_def456",
      "name": "high-priority",
      "color": "#e3342f"
    }
  ]
}

Errors

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

Set Station Tags

PUT /api/v1/stations/:id/tags

Replaces all tags on a station. Pass an empty array to remove all tags.

Path Parameters

ParameterTypeDescription
idstringThe station's unique identifier

Request Body

FieldTypeRequiredDescription
tagsstring[]YesArray of tag IDs to associate with the station

Example Request

curl -X PUT "https://orchestrator.assemblyline.sh/api/v1/stations/st_abc123/tags" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "tags": ["tag_abc123", "tag_def456"]
  }'

Response

{
  "data": [
    {
      "id": "tag_abc123",
      "name": "monthly",
      "color": "#0075ca"
    },
    {
      "id": "tag_def456",
      "name": "high-priority",
      "color": "#e3342f"
    }
  ]
}

Remove All Tags

curl -X PUT "https://orchestrator.assemblyline.sh/api/v1/stations/st_abc123/tags" \
  -H "api-key: al_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "tags": [] }'

Errors

CodeDescription
400Validation error (invalid tag IDs, tags not an array)
401Invalid or missing API credentials
403API key lacks stations:edit permission
404Station not found

See Also