Skip to content

projects

Projects module · 9 operations

List project rows

GET/projects

A production project. Jurisdiction is resolved at gate 1. Returns a cursor page of project rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.

Create a project

POST/projects

A production project. Jurisdiction is resolved at gate 1. Creates a project. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.

Get a project

GET/projects/{id}

A production project. Jurisdiction is resolved at gate 1. Returns one project with its `ETag`. A project the caller may not see returns 404.

Update a project

PATCH/projects/{id}

A production project. Jurisdiction is resolved at gate 1. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.

Transition the project state

POST/projects/{id}/transitions

Moves the project lifecycle to another state through its transition RPC, which writes the transition ledger. Uses compare-and-set on `expected_state`; a disallowed transition returns a 422 refusal. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.

Pass the current gate

POST/projects/{id}/gate-transitions

Moves the project to the next phase. Compare-and-set on `expected_phase_code`; refused with 422 when any blocking criterion lacks evidence. The database enforces the criteria. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.

Get gate readiness

GET/projects/{id}/gate-readiness

Lists each criterion of the next gate with whether evidence satisfies it. A rule that refuses the request returns 422 with `refusal` and `reason`.

Archive a project

POST/projects/{id}/archive

Sets `archived_at`, so the project leaves the default lists and stays readable and restorable. Archiving an archived project leaves it unchanged. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.

Restore an archived project

POST/projects/{id}/unarchive

Clears `archived_at`, so the project returns to the default lists. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.