Get Sandbox Content
- GET
- /workspaces
- /:workspace
- /sandboxes
- /:sandbox_id
- /content
- /:path
Get sandbox content by path
Request example
CURLcurl -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" } ] }
STATUS200 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 } ] }
STATUS200 Content retrieved successfully