Dominevo
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.

MethodKindTierToken scopeViewer
listqueryprotectedviewno
getqueryprotectedviewno
createmutationadminadmin onlyno
updatemutationadminadmin onlyno
deletemutationadminadmin onlyno

template.list

  • Kind: query — GET /trpc/template.list
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability template, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=template.list on 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: view on capability template, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=template.get on your hub

Input

{ id: string }

Output

TemplateRecordSchema | null

Shapes: 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.create on your hub

Input

{ kind: "remote" | "automation"; name: string; payload: unknown; tags?: string[] }

Output

TemplateWriteResultSchema

Shapes: 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.update on your hub

Input

{ id: string; name?: string; payload?: unknown; tags?: string[] }

Output

TemplateWriteResultSchema

Shapes: 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.delete on your hub

Input

{ id: string }

Output

TemplateDeleteResultSchema

Shapes: TemplateDeleteResultSchema