Initialize a project catalog
POST
Prepare the Catalog of a project and return its main branch. You can send this request more than once. When the Catalog exists, the response contains the current main branch. You must have permission to initialize the project.
bearerAuthheader
AuthorizationBearer <token>project_id*stringOwning project identifier. Nonempty, at most 128 UTF-8 bytes, with no control characters. Project creation belongs to the project service.
Success
application/json- response
branchId*catalog.BranchIdStable UUIDv7 branch identity. Rename preserves identity; deletion tombstones it.
Format
uuidcreatedAtMicros*|deletedAtMicros?||nullheadCommitId*catalog.CommitIdImmutable UUIDv7 project commit identity.
Format
uuidlastBranchEventId*catalog.BranchEventIdImmutable UUIDv7 branch event identity.
Format
uuidname*catalog.BranchNameSlash-separated branch name, at most 255 UTF-8 bytes. Empty, dot, trailing-dot, .lock, and control segments are rejected by the service.
curl -X POST 'https://api.spiraldb.dev/api/catalog/projects/string/initialize'{ "branchId": "712f308d-801e-48bc-b072-9c404734ceb7", "createdAtMicros": "string", "deletedAtMicros": "string", "headCommitId": "ccbbf3ab-15f4-491f-bfd0-0193cd890679", "lastBranchEventId": "26c3ae27-e158-44c2-95aa-45b0c7e8349c", "name": "string"}