ServicesCatalogHTTP APICommits

Read the commit log

POST
/api/catalog/projects/{project_id}/commits/log

Read a part of the commit graph, starting from the commits in starts. You must supply starts. To start from branch heads, list the branches first. To read more of the graph, send continuationCommitIds from the response as starts in a new request, with the same exclusions. The next response can contain commits that you already have; ignore them. A response contains at most 1000 commits. You must have permission to read the commit log of the project.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Path Parameters

project_id*string

Owning project identifier. Nonempty, at most 128 UTF-8 bytes, with no control characters. Project creation belongs to the project service.

Request Body

application/json
  1. body

starts is required and contains 1 through 1000 selectors. Absent exclusions means none; exclusions are bounded to 1000. Selectors resolve once for this request. Traverse descendants before ancestors, breaking generation ties by descending timestamp and commit identity. Excluded commits and their ancestors are omitted. Results are bounded graph slices, not cursor pages. An unprocessed frontier exceeding 1000 identities fails with CommitTraversalLimitExceeded rather than discarding reachable history.

excludeAncestorsOf?array<||>|null
maxCommits?|null
starts*array<||>
traversal?|null

Response Body

Success

application/json
  1. response

continuationCommitIds is the remaining graph frontier, not an opaque pagination token. Continuing from it can revisit ancestors already returned; callers maintain visited identities and reuse the exact resolved exclusion commits returned in resolvedExcludeAncestorsOf. No generated pages/items helper is exposed for this graph traversal. Reference inventories are read separately through paginated branch/tag methods. At most 1000 continuation identities are returned; a larger frontier is a named limit error.

commits*array<>
continuationCommitIds*array<>
resolvedExcludeAncestorsOf*array<>
resolvedStarts*array<>
truncated*boolean
curl -X POST 'https://api.spiraldb.dev/api/catalog/projects/string/commits/log' \  -H 'Content-Type: application/json' \  -d '{  "starts": [    {      "branch": {        "branch": "string"      },      "type": "branch"    }  ]}'
{  "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"  ],  "resolvedExcludeAncestorsOf": [    {      "commitId": "a1b223ee-0195-4e35-9b2a-72c93f345117",      "selector": {        "branch": {          "branch": "string"        },        "type": "branch"      }    }  ],  "resolvedStarts": [    {      "commitId": "a1b223ee-0195-4e35-9b2a-72c93f345117",      "selector": {        "branch": {          "branch": "string"        },        "type": "branch"      }    }  ],  "truncated": true}