versioning

Get the diff for a commit

Changed on

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

get/version/diff

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    • HTTP bearer
    • or OAuth 2
      Client credentials
      Token URL: https://login.cribl.cloud/oauth/token

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 returned in the items array.

Example response

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

Changes

    • breaking

      the response property //// became optional for the status

    • breaking

      the ////// response's property type changed from array to no type for status

    • info

      added the media type application/json for the response with the status

    • info

      added the optional property to the response with the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      added the required property to the response with the status