Skip to content
Console
On this page

Read file on a lease

Reads one file from the lease, at most 16 MiB; larger files use the guest's `/files`.

Reads one file from the lease, at most 16 MiB; larger files use the guest's /files.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:readFile
  • Scope sandboxes:exec
  • Effect read — nothing is written.
  • Collection leases

Request

FieldTypeWhat it is
namestringThe name of the lease. Required.
pathstringThe absolute path in the guest. Required.

Response

FieldTypeWhat it is
contentbytesThe file's bytes.
modeint32The file mode bits.

Errors

Every error arrives in the body Errors describes.

Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:readFile" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"…"}'