ReferenceHTTP API
terminalSession
The terminalSession router: 8 methods of the terminal-session capability, with tier, scope, input and output.
Capability terminal-session · scope system · mode singleton · source packages/types/src/capabilities/terminal-session.cap.ts:106.
Every method is called at /trpc/terminalSession.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
listProfiles | query | admin | admin only | no |
listSessions | query | admin | admin only | no |
serverShellStatus | query | admin | admin only | no |
openSession | mutation | admin | admin only | no |
resize | mutation | admin | admin only | no |
pullOutput | mutation | admin | admin only | no |
writeInput | mutation | admin | admin only | no |
close | mutation | admin | admin only | no |
terminalSession.listProfiles
- Kind: query —
GET /trpc/terminalSession.listProfiles - 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=terminalSession.listProfileson your hub
Input
voidOutput
TerminalProfileInfoSchema[]Shapes: TerminalProfileInfoSchema
terminalSession.listSessions
- Kind: query —
GET /trpc/terminalSession.listSessions - 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=terminalSession.listSessionson your hub
Input
voidOutput
TerminalSessionInfoSchema[]Shapes: TerminalSessionInfoSchema
terminalSession.serverShellStatus
- Kind: query —
GET /trpc/terminalSession.serverShellStatus - 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=terminalSession.serverShellStatuson your hub
Input
voidOutput
{ nodeId: string; enabled: boolean; idleMinutes: number; refusal: { code: "server-shell-disabled"; nodeId: string; message: string } | null }terminalSession.openSession
- Kind: mutation —
POST /trpc/terminalSession.openSession - 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=terminalSession.openSessionon your hub
Input
{ profileId: string; cols: number; rows: number; executable?: string; args?: string[]; cwd?: string; environment?: string[] }Output
TerminalSessionInfoSchemaShapes: TerminalSessionInfoSchema
terminalSession.resize
- Kind: mutation —
POST /trpc/terminalSession.resize - 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=terminalSession.resizeon your hub
Input
{ sessionId: string; cols: number; rows: number }Output
voidterminalSession.pullOutput
- Kind: mutation —
POST /trpc/terminalSession.pullOutput - 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=terminalSession.pullOutputon your hub
Input
{ sessionId: string; afterSeq: number; waitMs?: number = 0; waitForOutput?: boolean }Output
TerminalOutputBatchSchemaShapes: TerminalOutputBatchSchema
terminalSession.writeInput
- Kind: mutation —
POST /trpc/terminalSession.writeInput - 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=terminalSession.writeInputon your hub
Input
{ sessionId: string; data: string }Output
voidterminalSession.close
- Kind: mutation —
POST /trpc/terminalSession.close - 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=terminalSession.closeon your hub
Input
{ sessionId: string }Output
void