ReferenceHTTP API
template
The template router: 5 methods of the template capability, with tier, scope, input and output.
Capability template · scope system · mode collection · source packages/types/src/capabilities/template.cap.ts:76.
Every method is called at /trpc/template.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
list | query | protected | view | no |
get | query | protected | view | no |
create | mutation | admin | admin only | no |
update | mutation | admin | admin only | no |
delete | mutation | admin | admin only | no |
template.list
- Kind: query —
GET /trpc/template.list - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitytemplate, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=template.liston your hub
Input
{ kind?: "remote" | "automation" }Output
TemplateRecordSchema[]Shapes: TemplateRecordSchema
template.get
- Kind: query —
GET /trpc/template.get - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitytemplate, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=template.geton your hub
Input
{ id: string }Output
TemplateRecordSchema | nullShapes: TemplateRecordSchema
template.create
- Kind: mutation —
POST /trpc/template.create - 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=template.createon your hub
Input
{ kind: "remote" | "automation"; name: string; payload: unknown; tags?: string[] }Output
TemplateWriteResultSchemaShapes: TemplateWriteResultSchema
template.update
- Kind: mutation —
POST /trpc/template.update - 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=template.updateon your hub
Input
{ id: string; name?: string; payload?: unknown; tags?: string[] }Output
TemplateWriteResultSchemaShapes: TemplateWriteResultSchema
template.delete
- Kind: mutation —
POST /trpc/template.delete - 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=template.deleteon your hub
Input
{ id: string }Output
TemplateDeleteResultSchemaShapes: TemplateDeleteResultSchema