ReferenceHTTP API
tags
The tags router: 8 methods of the tags capability, with tier, scope, input and output.
Capability tags · scope system · mode singleton · source packages/types/src/capabilities/tags.cap.ts:57.
Every method is called at /trpc/tags.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
ensureTag | mutation | admin | admin only | no |
listTags | query | protected | view | no |
updateTag | mutation | admin | admin only | no |
deleteTag | mutation | admin | admin only | no |
list | query | protected | view | no |
setStyle | mutation | admin | admin only | no |
rename | mutation | admin | admin only | no |
remove | mutation | admin | admin only | no |
tags.ensureTag
- Kind: mutation —
POST /trpc/tags.ensureTag - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=tags.ensureTagon your hub
Input
{ name: string }Output
{ name: string; colour?: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h"; icon?: <custom>; description?: string; order?: number; id: string }tags.listTags
- Kind: query —
GET /trpc/tags.listTags - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitytags, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=tags.listTagson your hub
Input
{}Output
({ name: string; colour?: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h"; icon?: <custom>; description?: string; order?: number; id: string })[]tags.updateTag
- Kind: mutation —
POST /trpc/tags.updateTag - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=tags.updateTagon your hub
Input
{ id: string; patch: { name?: string; colour?: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h" | null; icon?: <custom> | null; description?: string | null; order?: number | null } }Output
{ name: string; colour?: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h"; icon?: <custom>; description?: string; order?: number; id: string }tags.deleteTag
- Kind: mutation —
POST /trpc/tags.deleteTag - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=tags.deleteTagon your hub
Input
{ id: string }Output
{ updated: TagUsageCountsSchema }Shapes: TagUsageCountsSchema
tags.list
- Kind: query —
GET /trpc/tags.list - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitytags, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=tags.liston your hub
Input
{}Output
TagEntrySchema[]Shapes: TagEntrySchema
tags.setStyle
- Kind: mutation —
POST /trpc/tags.setStyle - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=tags.setStyleon your hub
Input
{ name: string; color: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h"; icon: <custom> }Output
voidtags.rename
- Kind: mutation —
POST /trpc/tags.rename - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=tags.renameon your hub
Input
{ from: string; to: string }Output
{ updated: TagUsageCountsSchema }Shapes: TagUsageCountsSchema
tags.remove
- Kind: mutation —
POST /trpc/tags.remove - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=tags.removeon your hub
Input
{ name: string }Output
{ updated: TagUsageCountsSchema }Shapes: TagUsageCountsSchema