Compare the state of two commits
Return all net changes to resources and namespace bindings between two commits. The response is complete. It is not paged or truncated. When the result is too large, the response is CatalogLimitExceeded. 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.
Success
application/json- response
Canonical net mutations transforming base state into head state. Does not include assertions. Materialization limits produce named errors rather than silently truncating a diff.
baseCommitId*catalog.CommitIdImmutable UUIDv7 project commit identity.
uuidheadCommitId*catalog.CommitIdImmutable UUIDv7 project commit identity.
uuidnamespace*array<||>resources*array<|||>curl -X POST 'https://api.spiraldb.dev/api/catalog/projects/string/commits/diff' \ -H 'Content-Type: application/json' \ -d '{ "base": { "branch": { "branch": "string" }, "type": "branch" }, "head": { "branch": { "branch": "string" }, "type": "branch" }}'{ "baseCommitId": "444e6d44-c77c-4d6f-9c8c-82cfd8252d0c", "headCommitId": "ccbbf3ab-15f4-491f-bfd0-0193cd890679", "namespace": [ { "assert": { "expected": "cc46ff75-488a-4f5d-9162-1798e46c1fcc", "name": "string", "parent": { "prefix": { "path": [ "string" ], "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6" }, "type": "prefix" } }, "type": "assert" } ], "resources": [ { "advance": { "expected": "cc46ff75-488a-4f5d-9162-1798e46c1fcc", "replacement": "0d5797a7-50c5-42e4-893d-e90cf0476063", "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6" }, "type": "advance" } ]}