Skip to main content
GET
/
orgs
/
{org_id}
/
nodes
/
{node_id}
/
branches
/
diff
/
{source_branch}
..
{target_branch}
Compare Branches
curl --request GET \
  --url https://api.example.com/orgs/{org_id}/nodes/{node_id}/branches/diff/{source_branch}..{target_branch}
{
  "source_branch": "<string>",
  "target_branch": "<string>",
  "source_commit": "<string>",
  "target_commit": "<string>",
  "can_merge": true,
  "commits_ahead": 123,
  "commits_behind": 123,
  "merge_reason": "<string>",
  "has_conflicts": false,
  "comparison": {}
}

Headers

authorization
string | null

Path Parameters

org_id
string
required
node_id
string
required
source_branch
string
required
target_branch
string
required

Response

Successful Response

Response model for branch comparison.

source_branch
string
required

Source branch name

target_branch
string
required

Target branch name

source_commit
string
required

Source branch HEAD commit

target_commit
string
required

Target branch HEAD commit

can_merge
boolean
required

Whether branches can be merged via fast-forward

commits_ahead
integer
required

Number of commits source is ahead of target

commits_behind
integer
required

Number of commits source is behind target

merge_reason
string | null

Reason if merge is not possible

has_conflicts
boolean
default:false

Whether merge would have conflicts

comparison
Comparison · object

Additional comparison data