Skip to content

Read a bounded slice of a single file under an instance directory

GET
/api/v1/services/{id}/files/content

Returns up to maxBytes of a single file (head by default; tail=true for the last bytes). Path-traversal is rejected daemon-side; symlinks are never followed.

id
required
string
path
required
string

Relative path under the instance working directory

maxBytes
integer format: int32

Cap on bytes returned (default 64 KiB, ceiling 1 MiB)

tail
boolean

Return the LAST maxBytes instead of the first

File contents

Unauthorized

Forbidden

Instance or file not found