Get

  • GET
  • /workspaces
  • /:workspace
  • /projects
  • /:project_name
  • /repository
  • /branches
  • /:name

Returns details of a single branch

Request

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

Example: "my-company"

project_namerequiredstring
The human-readable ID of the project

Example: "my-project"

namerequiredstring
The name of the branch

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
namestring
The name of the branch
commitShortCommitView
descriptionstring
The description of the branch
defaultboolean
Indicates whether this branch is default branch in the repository

Last modified on Jan 26, 2026

Request example

CURL
curl -X GET "https://api.buddy.works/workspaces/:workspace/projects/:project_name/repository/branches/:name" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json"
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/branches/master", "html_url": "https://app.buddy.works/my-workspace/my-project/repository/branch/master", "name": "master", "commit": { "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/commits/a089d82fe56335c8abd8790859bba925ad10f9d1", "html_url": "https://app.buddy.works/my-workspace/my-project/repository/commit/a089d82fe56335c8abd8790859bba925ad10f9d1", "revision": "a089d82fe56335c8abd8790859bba925ad10f9d1", "author_date": "2025-10-10T04:23:04Z", "commit_date": "2025-10-10T04:23:04Z", "message": "Added vitest-output.xml", "committer": { "url": "https://api.buddy.works/workspaces/my-workspace/members/1", "html_url": "https://app.buddy.works/my-workspace/-/profile/1", "id": 1, "name": "John Doe", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png?ts=1760014081477", "email": "john.doe@company.com", "admin": true, "workspace_owner": true }, "author": { "url": "https://api.buddy.works/workspaces/my-workspace/members/1", "html_url": "https://app.buddy.works/my-workspace/-/profile/1", "id": 1, "name": "John Doe", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png?ts=1760014081477", "email": "john.doe@company.com", "admin": true, "workspace_owner": true } }, "description": "", "default": true }
STATUS
200 OK