Find merge bases
Return all best common ancestors of two commits. When the history has more than one best common ancestor, the response contains all of them. An empty list means that the histories are not related. 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
left*||A commit identity or a movable branch/immutable tag resolved exactly once per request. Relative expressions such as main~3 are not supported.
right*||A commit identity or a movable branch/immutable tag resolved exactly once per request. Relative expressions such as main~3 are not supported.
Success
application/json- response
All best common ancestors of the two resolved commits. Empty means unrelated histories; multiple bases are preserved rather than arbitrarily choosing one.
leftCommitId*catalog.CommitIdImmutable UUIDv7 project commit identity.
uuidmergeBaseCommitIds*array<>rightCommitId*catalog.CommitIdImmutable UUIDv7 project commit identity.
uuidcurl -X POST 'https://api.spiraldb.dev/api/catalog/projects/string/commits/merge-bases' \ -H 'Content-Type: application/json' \ -d '{ "left": { "branch": { "branch": "string" }, "type": "branch" }, "right": { "branch": { "branch": "string" }, "type": "branch" }}'{ "leftCommitId": "975da972-7690-498d-b121-d5957a16ab54", "mergeBaseCommitIds": [ "ad0efc5e-539b-4d2f-a07b-3e96d5a599c9" ], "rightCommitId": "a9e8d0a4-9811-4f7d-b26a-68c77023e273"}