files

Begin a large upload into /workspace: declare the size and SHA-256.

Then PUT each 1 MiB chunk (offset a multiple of chunkBytes; the last may be shorter), in any order and several at once, and commit. The file appears atomically only if every byte matches the digest.

post/v1/sandboxes/{id}/uploads

Request

  • Base URL: https://api.withruntime.com
  • URL: https://api.withruntime.com/v1/sandboxes/{id}/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

Absolute path under /workspace, e.g. /workspace/data/model.bin. To place the file elsewhere, move it with exec after the commit.

sizeinteger required
sha256string required
modestring

Octal permissions for the file, e.g. 755 for a program. Default 644. No set-id or sticky bits.

Example request

{
  "mode": "755"
}

Response

Success

uploadIdstring required
chunkBytesinteger required

Send chunks of this size.

parallelboolean

Chunks may be sent at the same time.

replayedboolean
modestring

Octal permissions for the file, e.g. 755 for a program. Default 644. No set-id or sticky bits.

Example response

{
  "mode": "755"
}

Changes

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