dev.avyos.dbg

api/dbg/api.json

Remote debugging and control API over Sutra/TCP for authenticated command execution, shell calls, and file transfer.

Service

FieldValue
Namedev.avyos.dbg
Packagedbg
Service ID0x00000060

Remote debugging and control API over Sutra/TCP for authenticated command execution, shell calls, and file transfer.

Types

Empty

Empty request/response payload.

No fields.

AuthRequest

Authentication request for a target identity.

FieldTypeDescription
Username string -
Password string -

SessionInfo

Authenticated session descriptor returned after login.

FieldTypeDescription
Token string -
Username string -
UID uint32 -
GID uint32 -
Home string -
Shell string -

SessionToken

Session token used to authorize subsequent requests.

FieldTypeDescription
Token string -

ExecRequest

Command or shell execution request.

FieldTypeDescription
Token string -
Command string -
Cwd string -
TimeoutSec int32 -

ExecResult

Captured command execution result.

FieldTypeDescription
ExitCode int -
Stdout []byte -
Stderr []byte -
StdoutTruncated bool -
StderrTruncated bool -

ShellOpenRequest

Open an interactive shell session for the authenticated identity.

FieldTypeDescription
Token string -
Cwd string -
Rows int -
Cols int -

ShellSession

Interactive shell session identifier.

FieldTypeDescription
SessionID uint32 -

ShellInputRequest

Input payload for an open interactive shell session.

FieldTypeDescription
Token string -
SessionID uint32 -
Data []byte -

ShellResizeRequest

Resize payload for an open shell pseudo-terminal.

FieldTypeDescription
Token string -
SessionID uint32 -
Rows int -
Cols int -

ShellCloseRequest

Close request for an active interactive shell session.

FieldTypeDescription
Token string -
SessionID uint32 -

ShellOutputEvent

Output stream payload for an active shell session.

FieldTypeDescription
SessionID uint32 -
Data []byte -

ShellExitEvent

Exit notification for a shell session.

FieldTypeDescription
SessionID uint32 -
ExitCode int -

ReadFileRequest

Read a file chunk from remote host.

FieldTypeDescription
Token string -
Path string -
Offset uint64 -
Size uint32 -

FileChunk

Chunked binary file content.

FieldTypeDescription
Data []byte -
Eof bool -

WriteFileRequest

Write a file chunk to remote host.

FieldTypeDescription
Token string -
Path string -
Offset uint64 -
Data []byte -
Truncate bool -
Mode uint32 -

WriteFileResult

Write operation result.

FieldTypeDescription
Written uint32 -

Requests

Authenticate

0x0601

Authenticate and create a debug session.

Input

Type: AuthRequest

Provide username and password.

Output

Type: SessionInfo

Returns session token and identity context.

Logout

0x0602

Close an authenticated debug session.

Input

Type: SessionToken

Provide active session token.

Output

Type: Empty

No payload is returned.

RunCommand

0x0610

Execute a command as the authenticated identity.

Input

Type: ExecRequest

Provide token and command line.

Output

Type: ExecResult

Returns exit code and captured output streams.

RunShell

0x0611

Execute command line through shell semantics as authenticated identity.

Input

Type: ExecRequest

Provide token and shell command line.

Output

Type: ExecResult

Returns exit code and captured output streams.

ShellOpen

0x0612

Open an interactive shell session for the authenticated identity.

Input

Type: ShellOpenRequest

Provide token, optional working directory and terminal size.

Output

Type: ShellSession

Returns shell session id.

ShellInput

0x0613

Send input bytes to an open shell session.

Input

Type: ShellInputRequest

Provide token, session id and input data.

Output

Type: none (one-way)

No response payload for one-way request.

ShellResize

0x0614

Resize the pseudo-terminal of an open shell session.

Input

Type: ShellResizeRequest

Provide token, session id and row/column size.

Output

Type: none (one-way)

No response payload for one-way request.

ShellClose

0x0615

Close an open shell session.

Input

Type: ShellCloseRequest

Provide token and session id.

Output

Type: none (one-way)

No response payload for one-way request.

ReadFile

0x0620

Read a binary file chunk from remote host.

Input

Type: ReadFileRequest

Provide token, path, offset and chunk size.

Output

Type: FileChunk

Returns data chunk and EOF marker.

WriteFile

0x0621

Write a binary file chunk to remote host.

Input

Type: WriteFileRequest

Provide token, path, offset and data bytes.

Output

Type: WriteFileResult

Returns number of bytes written.

Events

ShellOutput

0x0630

Published when shell output is available.

Payload

Type: ShellOutputEvent

Contains session id and output bytes.

ShellExit

0x0631

Published when a shell session exits.

Payload

Type: ShellExitEvent

Contains session id and exit code.