Sandbox API
Upload a file to a sandbox
Upload a file to a specific path in a sandbox. The sandbox must be running.
post/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/upload/{path}
Path parameters
workspace_domainstring required
Example:my-company
The human-readable ID of the workspace
sandbox_idstring required
Example:sb-1234567890abcdef
The ID of the sandbox
pathstring required
Example:buddy/example.txt
Absolute path where the file should be uploaded. Recommended directory is /buddy
Query parameters
userNamestring
Example:buddy
Owner of the uploaded file inside the sandbox. Defaults to buddy. Any user that exists in the sandbox is accepted.
Response
File uploaded successfully
Example response
{
"type": "FILE",
"name": "index.js",
"path": "app/src/index.js",
"size": 1024
}