ReferenceHTTP API
logs
The logs router: 4 hand-written core methods, with tier, input and output.
A core router of the hub (not a capability), source server/backend/src/api/core/logs.router.ts. Its methods are called at /trpc/logs.<method>. A core method checks only the tier: a scoped token that is signed in reaches every protected method here, unless the method itself refuses it. See How to call and Authorization.
Inputs and outputs are the validation schemas as written in the source.
logs.query
- Kind: query —
GET /trpc/logs.query - Tier: admin — an administrator only
- Source:
server/backend/src/api/core/logs.router.ts:198 - Try it: open
/system/api-explorer?method=logs.queryon your hub
Input
z.object({ source: z.string().min(1).max(200).optional(), level: LogLevelSchema.optional(), since: z.number().optional(), until: z.number().optional(), limit: z.number().int().min(1).max(1000).optional(), tags: LogTagsSchema.optional(), text: z.string().max(200).optional(), before: z.string().min(1).max(1024).optional(), after: z.string().min(1).max(1024).optional(), budgetMs: z.number().int().min(50).max(10_000).optional() })Output
LogPageSchema = z.object({ entries: LogEntryArraySchema, nextBefore: z.string().nullable(), nextAfter: z.string().nullable(), scannedBytes: z.number().int().nonnegative(), done: z.boolean(), cancelled: z.boolean().optional(), source: z.string() })logs.sources
- Kind: query —
GET /trpc/logs.sources - Tier: admin — an administrator only
- Source:
server/backend/src/api/core/logs.router.ts:268 - Try it: open
/system/api-explorer?method=logs.sourceson your hub
Input
noneOutput
z.array(LogSourceSchema)logs.clear
- Kind: mutation —
POST /trpc/logs.clear - Tier: admin — an administrator only
- Source:
server/backend/src/api/core/logs.router.ts:298 - Try it: open
/system/api-explorer?method=logs.clearon your hub
Input
z.object({ level: LogLevelSchema.optional(), since: z.number().optional(), until: z.number().optional(), tags: LogTagsSchema.optional() })Output
z.object({ removed: z.number().int().nonnegative() })logs.subscribe
- Kind: subscription —
WebSocket /trpc/logs.subscribe - Tier: admin — an administrator only
- Source:
server/backend/src/api/core/logs.router.ts:324 - Try it: open
/system/api-explorer?method=logs.subscribeon your hub
Input
z.object({ level: LogLevelSchema.optional(), tags: LogTagsSchema.optional(), text: z.string().max(200).optional() })Output
not declared