knowledge-gaps
knowledge-gaps

Transition a knowledge gap

Changed on

Drive the gap state machine (open → routed → ingested → resolved, plus dismissed/duplicate/expired/reopened). expected_from is a compare-and-set guard: if the gap already moved, the write loses with 409. Illegal transitions return 422.

post/knowledge-gaps/{gap_id}/transitions

Request

Path parameters

gap_idstring uuid required

Request body

expected_from'open' | 'routed' | 'ingested' | 'resolved' | 'expired' | 'dismissed' | 'duplicate' | 'reopened' required

State the caller believes the gap is in (compare-and-set guard).

to_state'open' | 'routed' | 'ingested' | 'resolved' | 'expired' | 'dismissed' | 'duplicate' | 'reopened' required

Target state.

actorstring required

Who performed the transition.

notestring nullable
evidence_refstring nullable

Optional link to the ingestion job / contribution that drove this transition.

assigned_tostring nullable

Opaque expert/DRI id the integrator routed to (set when moving to 'routed').

Response

Successful Response

gap_idstring uuid

UUIDv7 — chronologically sortable.

workspace_idstring uuid required

Owning workspace; multi-tenant isolation key.

pot_idstring uuid required

POT the question was asked against.

query_textstring required
contextstring nullable

The asker's case (where, what they see, what they tried); null when none was given. Gaps written before 0.7.24.0 have none.

requester_idstring required
domainstring required
trigger'low_confidence' | 'no_coverage' | 'manual'
trigger_scorenumber nullable
state'open' | 'routed' | 'ingested' | 'resolved' | 'expired' | 'dismissed' | 'duplicate' | 'reopened'
assigned_tostring nullable

Opaque id of the expert/DRI the integrator routed to. Core stores, never decides, this value.

resolved_cluster_idstring uuid nullable

Deprecated, always null: a hook for a Knowledge Cluster that was never built. Kept so stored items and clients keep validating.

capsule_idstring uuid nullable

Deprecated, always null in production: set only by the Capsules coverage evaluation, behind capsules_enabled (off). Marks the ORIGIN only; the trigger vocabulary is unchanged, so existing integrator payloads keep validating.

idempotency_keystring nullable
timeout_atstring date-time nullable

Deprecated, always null: no route sets it and the core never expires a gap; an SLA is the integrator's, which drives the gap to 'expired' itself.

created_atstring date-time
updated_atstring date-time
resolved_atstring date-time nullable

Changes