Get Content

View as Markdown
  • 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,
      "checksum": "sha256:60303ae22b998861bce3b28f33eec1be758a213c86c93c076dbe9f558c11c752"
    },
    {
      "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,
      "checksum": "sha256:fd61a03af4f77d870fc21e05e7e80678095c92d808cfb3b5c279ee04c74aca13"
    },
    {
      "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",
      "checksum": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
    }
  ]
}
STATUS
200 OK