v51

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-011189403.1 MB
versioning

Get the diff for a commit

Get the diff for a commit. Default is the latest commit (HEAD).

get/version/diff

Query parameters

commitstring

The Git commit hash to get the diff for.

filenamestring

The relative path of the file to get the diff for.

diffLineLimitinteger

Number of lines of the diff to return. Default is 1000. Set to <code>0</code> to return the full diff, regardless of the number of lines.

Response

The requested GitDiffResult object in a single-item list.

countinteger required

number of items present in the items array

Example response

{
  "items": [
    {
      "diffJson": [
        {
          "blocks": [
            {
              "header": "@@ -1,5 +1,8 @@"
            }
          ],
          "newMode": "100644"
        }
      ]
    }
  ]
}