import { createApiClient } from'@cloudillo/core'constapi=createApiClient({ idTag:'alice.cloudillo.net', authToken: token })
// List all tags
consttags=awaitapi.tags.list()
// List tags with prefix
constprojectTags=awaitapi.tags.list({ prefix:'proj-' })
// Add tag to file
awaitapi.files.addTag(fileId, 'important')
// Remove tag from file
awaitapi.files.removeTag(fileId, 'old-tag')
Tag Naming Conventions
Tags are case-sensitive
Use lowercase with hyphens for consistency: project-alpha, q1-2025
Avoid special characters except hyphens and underscores
Keep tags concise but descriptive
Filtering Files by Tag
// List files with a specific tag
constfiles=awaitapi.files.list({ tag:'important' })
// Multiple tags (all must match)
constfiles=awaitapi.files.list({ tags: ['project-alpha', 'active'] })