Repository contents

  • GET
  • /workspaces
  • /:workspace_domain
  • /projects
  • /:project_name
  • /repository
  • /contents

Returns the contents of the repository for the specified revision or HEAD

Request

REQUIRED SCOPES
REPOSITORY_READ
URL PARAMETERS
workspace_domainrequiredstring
The human-readable ID of the workspace

Example: "my-company"

project_namerequiredstring
The human-readable ID of the project

Example: "my-project"

GET PARAMETERS
revisionstring
The git revision (branch, tag, or commit) to retrieve contents from

Example: "main"

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
contentsRepositoryContentView[]

Last modified on Jan 26, 2026

Request example

CURL
curl -X GET "https://api.buddy.works/workspaces/:workspace_domain/projects/:project_name/repository/contents" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json"
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/contents", "html_url": "https://app.buddy.works/my-workspace/my-project/repository/content", "contents": [ { "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/contents/src", "html_url": "https://app.buddy.works/my-workspace/my-project/repository/content/%2Fsrc", "content_type": "DIR", "name": "src", "path": "/src" }, { "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/contents/ala.txt", "html_url": "https://app.buddy.works/my-workspace/my-project/repository/content/ala.txt", "content_type": "FILE", "encoding": "base64", "size": 10, "name": "ala.txt", "path": "ala.txt", "content": "77+977+977+9eg==" } ] }
STATUS
200 Directory contents