Tags API
Tags provide a flexible labeling system for organizing stations, lines and work records. Tags can be created independently and then associated with any entity.
Base URL
https://orchestrator.assemblyline.sh/api/v1/tags
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/tags | List all tags |
GET | /api/v1/tags/:id | Get a single tag |
POST | /api/v1/tags | Create a new tag |
PUT | /api/v1/tags/:id | Update a tag |
DELETE | /api/v1/tags/:id | Delete a tag |
Entity Tag Associations
Tags can be associated with stations and work records:
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/stations/:id/tags | Get station tags |
PUT | /api/v1/stations/:id/tags | Set station tags |
GET | /api/v1/work-records/:id/tags | Get work record tags |
PUT | /api/v1/work-records/:id/tags | Set work record tags |
Required Permissions
| Action | Permission |
|---|---|
| List/Get | tags:read |
| Create | tags:create |
| Update | tags:edit |
| Delete | tags:delete |
Entity tag association endpoints use the permissions of the parent entity (e.g., stations:read for GET /api/v1/stations/:id/tags).
Quick Example
List Tags
curl -X GET "https://orchestrator.assemblyline.sh/api/v1/tags" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Create Tag
curl -X POST "https://orchestrator.assemblyline.sh/api/v1/tags" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "monthly",
"color": "#0075ca",
"description": "Monthly recurring stations"
}'
See Also
- Station Tags — manage tags on stations
- Work Record Tags — manage tags on work records