Skip to main content
POST
/
v1
/
sandboxes
/
{id}
/
files
/
batch-write
Upload multiple files in one multipart request
import requests

url = "https://api.13-215-85-171.sslip.io/v1/sandboxes/{id}/files/batch-write"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"manifest\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
}

response = requests.post(url, data=payload, headers=headers)

print(response.text)
{
  "results": [
    {
      "status": "success",
      "path": "<string>",
      "info": {
        "name": "<string>",
        "path": "<string>",
        "is_dir": true,
        "size": 123,
        "type": "file",
        "mode": "0644",
        "permissions": "0644",
        "owner": "<string>",
        "group": "<string>",
        "modified_time": "2023-11-07T05:31:56Z",
        "symlink_target": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

id
string
required

Sandbox ID (e.g. sb_a1b2c3d4)

Body

multipart/form-data
manifest
string
required

JSON manifest describing destination paths and multipart field names.

Response

200 - application/json

Batch write result

results
object[]
required