Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Write file on a lease

Writes one file in the lease, at most 16 MiB, creating parent directories.

Writes one file in the lease, at most 16 MiB, creating parent directories.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:writeFile
  • Scope sandboxes:exec
  • Effect write — a successful call changes state.
  • Collection leases

#Request

FieldTypeWhat it is
namestringThe name of the lease. Required.
pathstringThe absolute path in the guest. Required.
contentbytesThe file's bytes. Required.
modeint32The file mode bits; default 0644.
appendboolAppend content to the file (created when absent) instead of replacing it, so a file larger than one call uploads in chunks.

#Response

FieldTypeWhat it is
size_bytesint64Bytes written.

#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:writeFile" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"…","path":"…"}'