ServicesCatalogHTTP APICommits

Resolve a commit selector

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

Resolve a commit, branch, or tag selector to one commit. The selector is resolved one time. Relative expressions such as main~3 are not supported. You must have permission to read 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
selector*||

A commit identity or a movable branch/immutable tag resolved exactly once per request. Relative expressions such as main~3 are not supported.

Response Body

Success

application/json
  1. response

Resolved immutable identity for the supplied selector. Pin this commit for subsequent multi-request reads.

commitId*catalog.CommitId

Immutable UUIDv7 project commit identity.

Formatuuid
selector*||

A commit identity or a movable branch/immutable tag resolved exactly once per request. Relative expressions such as main~3 are not supported.

curl -X POST 'https://api.spiraldb.dev/api/catalog/projects/string/commits/resolve' \  -H 'Content-Type: application/json' \  -d '{  "selector": {    "branch": {      "branch": "string"    },    "type": "branch"  }}'
{  "commitId": "a1b223ee-0195-4e35-9b2a-72c93f345117",  "selector": {    "branch": {      "branch": "string"    },    "type": "branch"  }}