GET
/
repos
/
{repo_id}
/
compare
curl --request GET \
  --url https://api.diversion.dev/v0/repos/{repo_id}/compare \
  --header 'Authorization: Bearer <token>'
{
  "object": "ComparisonItem",
  "items": [
    {
      "base_item": {
        "path": "hello.cc",
        "prev_path": "<string>",
        "status": 1,
        "mode": 16877,
        "mtime": "2023-11-07T05:31:56Z",
        "blob": {
          "storage_uri": "repo_id/2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
          "storage_backend": 1,
          "size": 123,
          "sha": "<string>"
        }
      },
      "other_item": {
        "path": "hello.cc",
        "prev_path": "<string>",
        "status": 1,
        "mode": 16877,
        "mtime": "2023-11-07T05:31:56Z",
        "blob": {
          "storage_uri": "repo_id/2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
          "storage_backend": 1,
          "size": 123,
          "sha": "<string>"
        }
      },
      "status": 1
    }
  ],
  "cascaded_changes_count": 123
}

Authorizations

Authorization
string
headerrequired

This API uses OAuth 2 with the implicit grant flow

Path Parameters

repo_id
string
required

The repo ID of the repository. Repo name can be used instead of the ID, but usage of ID for permanent linking and API requests is preferred.

Query Parameters

base_id
string
default:

A workspace_id, branch_id, commit_id or tag_id. If omitted, assuming the empty tree, unless other_id is a workspace, in which case base_id is assumed to be the workspace base ref.

other_id
string

A reference to a source version from which changes will be taken

Response

200 - application/json
object
enum<string>
required
Available options:
ComparisonItem
items
object[]
required
cascaded_changes_count
integer
required

Number of cascaded changes, for insight of total compare size