Compare

View as Markdown
  • GET
  • /workspaces
  • /:workspace
  • /projects
  • /:project_name
  • /repository
  • /comparison
  • /:base...:head

Returns the changes between two points. The response from the API is equivalent to running the git log base...head command

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"

baserequiredstring
The revision before the first one from the returned list

Example: "7c4786ffc65816bc3cd2418c3ceeb34134f4b03a"

headrequiredstring
The last revision in the returned list

Example: "d643744fbe5ebf2906a4d075a5b97110"

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
base_commitShortCommitView
aheadinteger
Number of commits ahead of the base
behindinteger
Number of commits behind the base
commitsShortCommitView[]
List of commits in the comparison range

Last modified on Nov 26, 2026

Request example

CURL
curl -X GET "https://api.buddy.works/workspaces/:workspace/projects/:project_name/repository/comparison/:base...:head" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json"
EXAMPLE RESPONSE
{
  "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/comparison",
  "html_url": "https://app.buddy.works/my-workspace/my-project/repository/commits",
  "commits": [
    {
      "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
      }
    },
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/commits/ced6de63ca555fad8d2290c1c158f87232ffd9e1",
      "html_url": "https://app.buddy.works/my-workspace/my-project/repository/commit/ced6de63ca555fad8d2290c1c158f87232ffd9e1",
      "revision": "ced6de63ca555fad8d2290c1c158f87232ffd9e1",
      "author_date": "2025-10-09T12:51:53Z",
      "commit_date": "2025-10-09T12:51:53Z",
      "message": "Changes to .bubby.yml",
      "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
      }
    },
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/commits/af0c5335900ab848c02a989690583074ed2cb7e9",
      "html_url": "https://app.buddy.works/my-workspace/my-project/repository/commit/af0c5335900ab848c02a989690583074ed2cb7e9",
      "revision": "af0c5335900ab848c02a989690583074ed2cb7e9",
      "author_date": "2025-10-09T12:51:10Z",
      "commit_date": "2025-10-09T12:51:10Z",
      "message": "Changes to .bubby.yml",
      "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
      }
    },
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/commits/9a0b44ffc71c8e7d81f5daf1eab58e5c35102180",
      "html_url": "https://app.buddy.works/my-workspace/my-project/repository/commit/9a0b44ffc71c8e7d81f5daf1eab58e5c35102180",
      "revision": "9a0b44ffc71c8e7d81f5daf1eab58e5c35102180",
      "author_date": "2025-10-09T12:49:45Z",
      "commit_date": "2025-10-09T12:49:45Z",
      "message": "Changes to .bubby.yml",
      "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
      }
    }
  ],
  "base_commit": {
    "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/commits/15118345e2fda9855d3641e434158af5cee9b444",
    "html_url": "https://app.buddy.works/my-workspace/my-project/repository/commit/15118345e2fda9855d3641e434158af5cee9b444",
    "revision": "15118345e2fda9855d3641e434158af5cee9b444",
    "author_date": "2025-10-09T12:48:38Z",
    "commit_date": "2025-10-09T12:48:38Z",
    "message": "Added .bubby.yml",
    "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
    }
  },
  "ahead": 0,
  "behind": 4
}
STATUS
200 OK