Skip to main content
POST
Read file contents

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

id
string
required

Machine ID (e.g. mch_a1b2c3d4)

Body

application/json
path
string
required

File path to read. Absolute paths may target valid machine locations such as /workspace, /data, /tmp, or /context where present. Relative paths resolve from the machine cwd when set, otherwise from the selected user's home when user is provided, otherwise from /workspace.

encoding
enum<string>
default:utf8
Available options:
utf8,
base64
user
string

Optional machine user for relative-path resolution and ownership.

Response

200 - application/json

File contents

content
string
required
encoding
string
required
size
integer<uint64>
required