files

Begin unpacking a large tar archive into a folder, sent in chunks.

Then PUT the archive in order, 1 MiB at most a request, at ?offset= its place, and commit. The sandbox unpacks as the bytes arrive, so nothing is staged on its disk. A chunk resent after a lost answer is not written twice. An upload not committed within 6 hours is ended. At most 4 at once in a sandbox. Needs write_file.

post/v1/sandboxes/{id}/files/archive/uploads

Request

  • Base URL: https://api.withruntime.com
  • URL: https://api.withruntime.com/v1/sandboxes/{id}/files/archive/uploads
  • Auth: HTTP bearer

Path parameters

idstring required

Resource identifier (UUID).

Headers

Idempotency-Keystring

Replaying the same key with the same request within 24 hours returns the first result and never repeats the effect. A refusal is not kept: a request refused before it ran (no_capacity, busy, a limit) runs afresh when sent again with its key. The SDKs send one automatically; the server makes one when absent and returns it in the idempotency-key response header.

Request body

pathstring required

The folder, absolute, e.g. /workspace/app. An upload makes it and its parents, and merges into what is there.

gzipboolean

The archive is gzip-compressed.

user'sandbox' | 'root'

Run tar as the sandbox user, or as root through passwordless sudo.

Response

Success

uploadIdstring required
pathstring required
gzipboolean required
chunkBytesinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.