Menu
Platform
AI
App store purchases
Database
Flags
Jobs and cron
Localization
Monitoring
Notifications
Payments
Queues
Sandboxes
Webhooks
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
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
| Field | Type | What it is |
|---|---|---|
name | string | The name of the lease. Required. |
path | string | The absolute path in the guest. Required. |
#Response
| Field | Type | What it is |
|---|---|---|
content | bytes | The file's bytes. |
mode | int32 | The file mode bits. |
#Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.NOT_FOUND— No method is served at this path.INVALID_STATE— The Resource is in a state that forbids the call.
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":"…"}'