v4

latestOpenAPI 3.0.1Apache 2.02026-07-312457525.9 MB
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

urlstring

API endpoint to GET this object

html_urlstring

Web URL to view this object in Buddy.works

type'FILE' | 'DIR'

The content type (FILE or DIR)

namestring

The name of the file or directory

pathstring

The path to the file or directory

sizeinteger

The size of the file in bytes

Example response

{
  "type": "FILE",
  "name": "index.js",
  "path": "app/src/index.js",
  "size": 1024
}