Compare two commits
Compare a base and a head commit. The response contains the exact number of commits that each side has and the other does not, and a bounded part of the graph that only the head has. When the comparison is larger than the traversal limits, the response is CommitTraversalLimitExceeded. You must have permission to read the project.
bearerAuthAuthorizationBearer <token>project_id*stringOwning project identifier. Nonempty, at most 128 UTF-8 bytes, with no control characters. Project creation belongs to the project service.
application/json- body
base*||A commit identity or a movable branch/immutable tag resolved exactly once per request. Relative expressions such as main~3 are not supported.
head*||A commit identity or a movable branch/immutable tag resolved exactly once per request. Relative expressions such as main~3 are not supported.
maxCommits?|nullSuccess
application/json- response
Exact ahead/behind counts and bounded head-only commit graph. Counts serialize as unsigned decimal strings. continuationCommitIds is a graph frontier with the same duplicate-handling responsibility and 1000-identity bound as CommitLog; it is not a page token. Internal traversal is bounded to 100000 commits per side and exceeding that bound is a named error.
aheadCount*|baseCommitId*catalog.CommitIdImmutable UUIDv7 project commit identity.
uuidbehindCount*|commits*array<>continuationCommitIds*array<>headCommitId*catalog.CommitIdImmutable UUIDv7 project commit identity.
uuidmergeBaseCommitIds*array<>truncated*booleancurl -X POST 'https://api.spiraldb.dev/api/catalog/projects/string/commits/compare' \ -H 'Content-Type: application/json' \ -d '{ "base": { "branch": { "branch": "string" }, "type": "branch" }, "head": { "branch": { "branch": "string" }, "type": "branch" }}'{ "aheadCount": "string", "baseCommitId": "444e6d44-c77c-4d6f-9c8c-82cfd8252d0c", "behindCount": "string", "commits": [ { "actor": "string", "commitId": "a1b223ee-0195-4e35-9b2a-72c93f345117", "committedAtMicros": "string", "message": "string", "namespaceChangeCount": 0, "parentCommitIds": [ "2a998c40-3602-476d-9578-67b2702f3d8f" ], "resourceChangeCount": 0, "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc" } ], "continuationCommitIds": [ "438269c6-dafc-41eb-a1b7-225881b25a61" ], "headCommitId": "ccbbf3ab-15f4-491f-bfd0-0193cd890679", "mergeBaseCommitIds": [ "ad0efc5e-539b-4d2f-a07b-3e96d5a599c9" ], "truncated": true}