ServicesCatalogHTTP APIState

Read project state

GET
/api/catalog/projects/{project_id}/commits/{commit_id}/state

Read the resources and namespace bindings of the project at one immutable commit, one page at a time. You must have permission to read the project state.

This operation returns results in pages. To get the next page, send the nextPageToken value of the response as pageToken in a new request with the same parameters. When the response has no nextPageToken, there are no more pages.

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.

commit_id*string

Immutable UUIDv7 project commit identity.

Formatuuid

Query Parameters

pageSize?|null
pageToken?|null

Response Body

Success

application/json
  1. response

Immutable project state has two collections. Resource entries precede namespace entries in a canonical traversal, ordered respectively by resource identity and canonical parent/name domain. pageSize bounds the combined number of entries. Absence of nextPageToken terminates traversal; pages may contain either or both collections. Only page iteration is generated, so neither collection silently disappears.

commitId*catalog.CommitId

Immutable UUIDv7 project commit identity.

Formatuuid
namespace*array<>
nextPageToken?|null
resources*array<>
curl -X GET 'https://api.spiraldb.dev/api/catalog/projects/string/commits/497f6eca-6276-4993-bfeb-53cbbbba6f08/state'
{  "commitId": "a1b223ee-0195-4e35-9b2a-72c93f345117",  "namespace": [    {      "name": "string",      "parent": {        "prefix": {          "path": [            "string"          ],          "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6"        },        "type": "prefix"      },      "resource": {        "descriptor": {          "kind": "string",          "namespaceManaged": true,          "namespaceRoot": "cfa7f0de-65e7-43ae-ae5e-e42145401b8a",          "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6",          "service": "string"        },        "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7"      }    }  ],  "nextPageToken": "string",  "resources": [    {      "descriptor": {        "kind": "string",        "namespaceManaged": true,        "namespaceRoot": "cfa7f0de-65e7-43ae-ae5e-e42145401b8a",        "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6",        "service": "string"      },      "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7"    }  ]}