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

MethodEndpointDescription
GET/api/v1/tagsList all tags
GET/api/v1/tags/:idGet a single tag
POST/api/v1/tagsCreate a new tag
PUT/api/v1/tags/:idUpdate a tag
DELETE/api/v1/tags/:idDelete a tag

Entity Tag Associations

Tags can be associated with stations and work records:

MethodEndpointDescription
GET/api/v1/stations/:id/tagsGet station tags
PUT/api/v1/stations/:id/tagsSet station tags
GET/api/v1/work-records/:id/tagsGet work record tags
PUT/api/v1/work-records/:id/tagsSet work record tags

Required Permissions

ActionPermission
List/Gettags:read
Createtags:create
Updatetags:edit
Deletetags: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