Compare entities between two branches
POST /Platform/entities/diff-branches
Compare entities between two branches.
For each entity type, returns which entities are only on one branch, which diverged, and optionally the unified diffs for diverged entities.
Body parameters
entity_types: List[Any]. List of entity type names to compare.branch: optional str. Base branch.compare_branch: optional str. Branch to compare against.include_diffs: optional bool. If True, include unified diff text for diverged entities (up todiff_limit).diff_limit: optional int. Max number of diverged entities to compute full diffs for (avoids runaway cost).
Returns
DiffBranchesResponse
results: optional dict or null. Entity type to only_in_base, only_in_compare, diverged (entity_id, diff, changed_fields) and identical_count.code_ranges: optional List[dict]. Per repository: repo_id, base_sha, compare_sha and whether the two heads are identical.
Example request
curl -X POST "https://api.hilus.ai/Platform/entities/diff-branches" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'