Tags API
Endpoints for managing tags on media files.
List All Tags
Get all tags in the library with usage counts.
Response
Get File Tags
Get tags assigned to a specific file.
Parameters
| Parameter | Type | Description |
|---|---|---|
| path | string | URL-encoded file path |
Response
Add Tag to File
Add a tag to a single file.
Request
Response
Success (200):
Remove Tag from File
Remove a tag from a single file.
Request
Response
Success (200):
Bulk Add Tag
Add a tag to multiple files at once.
Request
{
"paths": [
"photos/vacation/beach.jpg",
"photos/vacation/sunset.jpg",
"photos/vacation/hotel.jpg"
],
"tag": "vacation"
}
Response
Bulk Remove Tag
Remove a tag from multiple files at once.
Request
Response
Tag Management Endpoints
Get All Tags with Counts
Get all tags with usage statistics.
Response
[
{
"name": "vacation",
"color": "#3b82f6",
"count": 42
},
{
"name": "family",
"color": "",
"count": 28
},
{
"name": "unused",
"color": "#10b981",
"count": 0
}
]
Tags are sorted by count (descending), then name (alphabetically).
Get Unused Tags
Get all tags that have no file associations.
Response
Rename Tag Everywhere
Rename a tag and update all file associations.
Parameters
| Parameter | Type | Location | Description |
|---|---|---|---|
| tag | string | path | Current tag name (URL-encoded) |
Request
Response
Special Cases:
- If the new name already exists, tags are merged automatically
- Case-only changes are supported (e.g., "animal" → "Animal")
- Same name returns 0 affected files (no-op)
Delete Tag Everywhere
Delete a tag from all file associations.
Parameters
| Parameter | Type | Location | Description |
|---|---|---|---|
| tag | string | path | Tag name (URL-encoded) |
Response
The tag and all its file associations are removed in a single transaction.