Get Content

  • GET
  • /workspaces
  • /:workspace
  • /artifacts
  • /:artifact_id
  • /versions
  • /:version_id
  • /content
  • /:path

Get artifact version content at specific path

Request

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

Example: "my-company"

artifact_idrequiredstring
The Artifact ID

Example: "x5169jL2"

version_idrequiredstring
The Version ID

Example: "a9f84k2L"

pathrequiredstring
The file or directory location in the artifact version

Constraints: Pattern: .*

Example: "src/components"

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
contentsArtifactVersionContentItem[]
Array of content items. Contains one element when requesting a specific file, multiple elements when requesting a directory.

Last modified on Jun 29, 2026

Request example

CURL
curl -X GET "https://api.buddy.works/workspaces/:workspace/artifacts/:artifact_id/versions/:version_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/ttests/artifacts/x5169jL2/versions/a9f84k2L/content/src/components", "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content/src/components", "contents": [ { "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/content/src/components/Button.js", "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content/src/components/Button.js", "type": "FILE", "name": "Button.js", "path": "src/components/Button.js", "size": 1024 }, { "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/content/src/components/Header.tsx", "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content/src/components/Header.tsx", "type": "FILE", "name": "Header.tsx", "path": "src/components/Header.tsx", "size": 2560 }, { "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/content/src/components/styles", "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content/src/components/styles", "type": "DIR", "name": "styles", "path": "src/components/styles" } ] }
STATUS
200 OK
File metadata
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/content?path=/dir/README.md", "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content/README.md", "contents": [ { "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/content?path=/dir/README.md", "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content/README.md", "type": "FILE", "size": 2048, "name": "README.md", "path": "/dir/README.md" } ] }
STATUS
200 OK