Skip to main content
GET
/
api
/
diff
Get diff between two commits
curl --request GET \
  --url https://api.example.com/api/diff \
  --header 'Authorization: Bearer <token>'
{
  "files": [
    {
      "oldPath": "<string>",
      "newPath": "<string>",
      "hunks": [
        {
          "oldRange": {
            "start": 123,
            "lines": 123
          },
          "newRange": {
            "start": 123,
            "lines": 123
          },
          "body": "<string>",
          "heading": "<string>"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your API key.

Query Parameters

repo
string
required

The fully-qualified repository name.

base
string
required

The base git ref (branch, tag, or commit SHA) to diff from.

head
string
required

The head git ref (branch, tag, or commit SHA) to diff to.

Response

Structured diff between the two refs.

files
object[]
required

The list of changed files.