Get Sandbox Content

View as Markdown
  • GET
  • /workspaces
  • /:workspace
  • /sandboxes
  • /:sandbox_id
  • /content
  • /:path

Get sandbox content by path

Request

REQUIRED SCOPES
SANDBOX_READ
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

sandbox_idrequiredstring
The ID of the sandbox

Example: "sb-1234567890abcdef"

pathrequiredstring
Absolute path to the file or directory. Recommended directory is /buddy

Constraints: Pattern: .*

Example: "buddy/src"

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
contentsSandboxContentItem[]
List of content items in the directory

Last modified on Apr 22, 2026

Request example

CURL
curl -X GET "https://api.buddy.works/workspaces/:workspace/sandboxes/:sandbox_id/content/:path" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json"

Response examples

Directory listing
EXAMPLE RESPONSE
{
  "url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-12345/content/buddy/src",
  "html_url": "https://app.buddy.works/my-project/sandboxes/sb-12345",
  "contents": [
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-12345/content/buddy/src/index.js",
      "html_url": "https://app.buddy.works/my-project/sandboxes/sb-12345",
      "type": "FILE",
      "name": "index.js",
      "path": "/buddy/src/index.js",
      "size": 1024
    },
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-12345/content/buddy/src/components",
      "html_url": "https://app.buddy.works/my-project/sandboxes/sb-12345",
      "type": "DIR",
      "name": "components",
      "path": "/buddy/src/components"
    }
  ]
}
STATUS
200 Content retrieved successfully
File metadata
EXAMPLE RESPONSE
{
  "url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-12345/content/buddy/src/index.js",
  "html_url": "https://app.buddy.works/my-project/sandboxes/sb-12345",
  "contents": [
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-12345/content/buddy/src/index.js",
      "html_url": "https://app.buddy.works/my-project/sandboxes/sb-12345",
      "type": "FILE",
      "name": "index.js",
      "path": "/buddy/src/index.js",
      "size": 1024
    }
  ]
}
STATUS
200 Content retrieved successfully