Skip to main content
GET
/
{org}
/
{repo}
/
diff
Get diff
curl --request GET \
  --url https://api.mesa.dev/v1/{org}/{repo}/diff \
  --header 'Authorization: Bearer <token>'
{
  "base_change_id": "<string>",
  "head_change_id": "<string>",
  "stats": {
    "files": 123,
    "additions": 123,
    "deletions": 123,
    "changes": 123
  },
  "files": [
    {
      "path": "<string>",
      "change_type": "added",
      "previous_path": "<string>",
      "size_bytes": 123,
      "patch": "<string>"
    }
  ],
  "omitted_files": [
    {
      "path": "<string>",
      "change_type": "added",
      "reason": "binary",
      "previous_path": "<string>",
      "size_bytes": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

org
string
required

Organization slug

Minimum string length: 1
repo
string
required

Repository name

Minimum string length: 1

Query Parameters

base_change_id
string
required

Base change id for the diff. Use the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to diff from the empty tree.

Pattern: ^[zyxwvutsrqponmlk]{32}$
head_change_id
string
required

Head change id for the diff. Use the virtual root change id (zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz) to diff against the empty tree.

Pattern: ^[zyxwvutsrqponmlk]{32}$

Response

Diff response

base_change_id
string
required
Pattern: ^[zyxwvutsrqponmlk]{32}$
head_change_id
string
required
Pattern: ^[zyxwvutsrqponmlk]{32}$
stats
object
required
files
object[]
required
omitted_files
object[]
required

Changed files whose patch content was intentionally omitted from the response