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

MethodKindTierToken scopeViewer
listProfilesqueryadminadmin onlyno
listSessionsqueryadminadmin onlyno
serverShellStatusqueryadminadmin onlyno
openSessionmutationadminadmin onlyno
resizemutationadminadmin onlyno
pullOutputmutationadminadmin onlyno
writeInputmutationadminadmin onlyno
closemutationadminadmin onlyno

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.listProfiles on your hub

Input

void

Output

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.listSessions on your hub

Input

void

Output

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.serverShellStatus on your hub

Input

void

Output

{ 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.openSession on your hub

Input

{ profileId: string; cols: number; rows: number; executable?: string; args?: string[]; cwd?: string; environment?: string[] }

Output

TerminalSessionInfoSchema

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

Input

{ sessionId: string; cols: number; rows: number }

Output

void

terminalSession.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.pullOutput on your hub

Input

{ sessionId: string; afterSeq: number; waitMs?: number = 0; waitForOutput?: boolean }

Output

TerminalOutputBatchSchema

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

Input

{ sessionId: string; data: string }

Output

void

terminalSession.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.close on your hub

Input

{ sessionId: string }

Output

void