Compare

  • GET
  • /workspaces
  • /:domain
  • /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...headcommand

Request

REQUIRED SCOPES
WORKSPACE, REPOSITORY_READ
URL PARAMETERS
baserequired string
The revision before the first one from the returned list.
domainrequired string
The workspace domain.
headrequired string
The last revision in the returned list.
project_namerequired string
The name ID of the project.
GET PARAMETERS
pageinteger
The number of the successive page (results are splitted by pages of per_page elements each).
per_pageinteger
The number of returned elements on the page.

Last modified on Sep 23, 2024

Example:

CURL
curl -X GET "https://api.buddy.works/workspaces/:domain/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/buddy/projects/company-website/repository/comparison", "html_url": "https://app.buddy.works/buddy/company-website/repository/commits", "commits": [ { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/7c4786ffc65816bc3cd2418c3ceeb34134f4b03a", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/7c4786ffc65816bc3cd2418c3ceeb34134f4b03a", "revision": "7c4786ffc65816bc3cd2418c3ceeb34134f4b03a", "author_date": "2016-03-02T12:29:55Z", "commit_date": "2016-03-02T12:29:55Z", "message": "Added readme.md", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } } ], "base_commit": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08", "html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08", "revision": "506a3963507943d6908154f4bc9646e829128a08", "author_date": "2016-01-19T12:36:33Z", "commit_date": "2016-01-19T12:36:33Z", "message": "init repo\n", "committer": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" }, "author": { "url": "https://api.buddy.works/workspaces/buddy/member/1", "html_url": "https://app.buddy.works/buddy/profile/1", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png" } }, "ahead": 0, "behind": 1 }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999