Manage tags associated with a station. Tags are returned as part of station GET responses and can be managed independently via these endpoints.
GET /api/v1/stations/:id/tags
Returns all tags associated with a station.
Path Parameters
| Parameter | Type | Description |
|---|
id | string | The 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
| Code | Description |
|---|
401 | Invalid or missing API credentials |
403 | API key lacks stations:read permission |
404 | Station not found |
PUT /api/v1/stations/:id/tags
Replaces all tags on a station. Pass an empty array to remove all tags.
Path Parameters
| Parameter | Type | Description |
|---|
id | string | The station's unique identifier |
Request Body
| Field | Type | Required | Description |
|---|
tags | string[] | Yes | Array 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"
}
]
}
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
| Code | Description |
|---|
400 | Validation error (invalid tag IDs, tags not an array) |
401 | Invalid or missing API credentials |
403 | API key lacks stations:edit permission |
404 | Station not found |
See Also
- Tags API — tag CRUD operations
- Get Station — tags are included in station responses