dev.avyos.dbg

api/dbgd/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 -

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.

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.