Rules Engine API Reference

Manages the JSON Decision Model (JDM) rule sets behind CRAIG’s automated determinations and evaluates inputs against them via the GoRules Zen Engine.

Endpoints

Background Jobs

Poll a background job

GET /v1/rules/jobs/{id}

The generic read-only poll of a rules background job: the job as a LOGICAL resource — state (queued / running / succeeded / failed; the last two are terminal and immutable), the current attempt and the attempts[] ledger (an interrupted / crash attempt re-queues a convergent kind up to max_attempts), the typed progress document, result (the kind’s report — for promote_preview { preview_id, report }, the persisted canary evidence + the execute binding — present iff succeeded), error (a CLOSED token + a categorical detail — engine_failed with live-revision-moved when the live head moved between enqueue and start: re-preview — present iff failed), and resource when the kind links its own row. Authorized on the BackgroundJob resource type: admin realm-flat, the creator (human or service principal) by assigned_worker_sub; another actor is the fleet’s typed 403; an unknown id is 404 (no existence collapse — the row is looked up before the check). Cache-Control: no-store. Never writes.

Table 1. Parameters
Name In Required Description

id

path

Yes

Job id — the last segment of the Location the enqueuing 202 answered

Responses
  • 200: The job (Cache-Control: no-store)

  • 401: Unauthorized

  • 403: Forbidden — not the creator and not admin

  • 404: No such job

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Evaluation

Evaluate input against a rule set

POST /v1/rules/evaluate

Runs the named rule set against the provided input and records an audit trail. With expect, it runs only if the active rule set is exactly that (rule_set_id, revision); otherwise it answers 409 ruleset-moved naming the active identity, and nothing is evaluated or recorded.

Table 2. Request Fields
Field Type Required Description

context_id

UUID (optional)

No

Optional context entity ID for the audit trail.

context_type

string (optional)

No

Optional context type for the audit trail (e.g. "eligibility", "case"). A NUL (U+0000), which the column cannot store, is a 422 validation-failed on this field.

expect

ExpectedRuleSet (optional)

No

Expect

input

object

Yes

Input data to feed into the rule set. It may nest at most 16 levels, hold at most 5,000 values, and no string or key longer than 16,384 bytes. A document past a limit, or with a NUL (U+0000) in any string or object key, is a 422 validation-failed on this field.

pin

EvaluationPin (optional)

No

Pin

rule_set

string

Yes

Name of the rule set to evaluate against (resolved against the in-memory cache on a live evaluation and advisory when pin is present, so not NUL-gated).

Responses
  • 200: Evaluation result

  • 400: Bad request: pin with expect (exclusive), or a pinned snapshot that no longer compiles (invalid-ruleset)

  • 401: Unauthorized

  • 403: Forbidden

  • 404: Rule set not found

  • 409: ruleset-moved: the active rule set is not the `expect`ed (rule_set_id, revision); the detail names the active identity, and nothing ran or was recorded

  • 422: validation-failed: rule_set or context_type over 64 bytes, or a NUL (U+0000) in input or context_type

  • 500: Internal error

  • 503: Evaluation exceeded the dispatch budget (CRAIG_RULES__EVAL_TIMEOUT_MS)

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


List evaluation audit records

GET /v1/rules/evaluations

Paginated and filterable list of past rule evaluations. Requires supervisor or admin role.

Table 3. Parameters
Name In Required Description

page

query

No

Page number (1-based).

per_page

query

No

Items per page (max 500).

context_type

query

No

Filter by context type. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

context_id

query

No

Filter by context entity ID.

rule_set_name

query

No

Filter by rule set name. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

disposition

query

No

Filter by disposition: completed, runtime_error, timeout, or late_completed.

Responses
  • 200: Paginated list of evaluations

  • 400: Unknown disposition filter or page depth past the cap; a malformed query parameter (e.g. a non-UUID context_id) is the extractor’s value-free bad-request problem, before the handler

  • 401: Unauthorized

  • 403: Forbidden — supervisor or admin role required; an assignment-scoped grant is refused rather than widened, since evaluations carry no per-worker ownership

  • 422: A filter over its length cap: context_type / rule_set_name 64, disposition 32 bytes; or a NUL (U+0000) in context_type or rule_set_name (validation-failed naming the parameter, value-free)

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


EventReplay

Replay outbox events in a time window

POST /v1/admin/events/replay

Re-stages the published outbox rows created in [from, to] (optionally one event_type) so the outbox worker republishes them. At most 100000 rows per call; when more is true, call again with the same window and resume_from. Rows already pending are left alone. dry_run=true only counts. A from older than the service’s outbox retention window is refused. Each batch commits on its own, so after a 5xx the committed batches stay re-staged and re-running the same window picks up the rest. Every admitted call, a dry run included, records an admin.events_replayed act naming the worker.

Table 4. Parameters
Name In Required Description

from

query

Yes

RFC 3339 inclusive lower bound on event_outbox.created_at.

to

query

Yes

RFC 3339 inclusive upper bound on event_outbox.created_at.

event_type

query

No

Optional event_type scope. When present, only rows whose event_type equals this value are counted and re-staged; when absent, the whole [from, to] window is in scope.

dry_run

query

No

If true, return the would-replay count without modifying rows.

resume_from

query

No

The resume_from cursor a previous response returned with more = true. Passed back with the same from / to / event_type, the re-stage continues strictly past that key. A string that is not a cursor is a 400 naming this field.

Responses
  • 200: The window’s count and what this call re-staged

  • 400: bad-request: a malformed or missing from / to, a non-boolean dry_run, from after to, from older than the outbox retention window, or a resume_from that is not a replay cursor (field names it)

  • 401: Missing or invalid bearer token

  • 403: The acting identity is not an admin, or is a bare service principal (worker-required): a replay is a worker’s act

  • 422: validation-failed: event_type longer than 255 bytes

  • 500: Internal error (the re-staged count overflowed, or an unclassified database error); batches already committed stay committed

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Rule Sets

List active rule sets

GET /v1/rules/sets

Table 5. Parameters
Name In Required Description

page

query

No

Page number (1-based).

per_page

query

No

Items per page (max 500).

search

query

No

Full-text search across name and description. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

prefix

query

No

Prefix filter (e.g. {jurisdiction}-authz-). Used by craig-authz boot-load + RMQ-driven cache refresh to narrow the scan to a jurisdiction’s authz rulesets. A NUL (U+0000), which the query’s TEXT predicate cannot bind, is a 422 validation-failed on this parameter.

sort_by

query

No

Sort column: name, version (default: created_at).

sort_dir

query

No

Sort direction: asc or desc (default: desc).

include

query

No

content to have each row carry its decision graph. Left out, a row is a summary with no content key; the detail routes always return the graph. Any other value is the extractor’s 400.

Responses
  • 200: Paginated list of active rule sets. Each row is a summary; its content (the decision graph) is present only under include=content

  • 400: A page past the depth cap; a malformed query parameter (e.g. a non-integer page) is the extractor’s value-free bad-request problem, before the handler

  • 401: Unauthorized

  • 403: Forbidden — including a worker- or supervisor-scoped caller: these rows carry no per-worker ownership, so an assignment scope is refused rather than widened

  • 422: A filter over its length cap: search 500, prefix 64, sort_by / sort_dir 32 bytes; or a NUL (U+0000) in search or prefix (validation-failed naming the parameter, value-free)

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Create a new rule set

POST /v1/rules/sets

Validates that the JDM content compiles before persisting. Requires admin role.

Table 6. Request Fields
Field Type Required Description

client_request_id

UUID

Yes

Client-minted idempotency id — REQUIRED. Same id + identical intent replays the ORIGINAL rule set (the row as the detail projection now serves it); a different intent under the same id is a 409 idempotency-conflict. A same-name create under a FRESH id stays the domain 409 (the retained rule_sets_name_key natural-key backstop).

content

object

Yes

JDM decision model content (GoRules format). It may nest at most 32 levels, hold at most 50,000 values, and no string or key longer than 65,536 bytes. A document past a limit, or with a NUL (U+0000) in any string or object key, is a 422 validation-failed on this field.

description

string (optional)

No

Optional description. A NUL (U+0000), which the column cannot store, is a 422 validation-failed on this field.

name

string

Yes

Human-readable name (must be unique). Lowercase with interior hyphens/underscores: ^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$, 1-64 chars.

version

string

Yes

Semantic version string (at most 64 bytes, CODE_MAX, matching the promotion lifecycle’s 64-byte version cap). A NUL (U+0000), which the column and change-event payload cannot store, is a 422 validation-failed on this field.

Responses
  • 200: Rule set created (a replay returns the rule set as the detail projection now serves it — same client_request_id + intent)

  • 400: Invalid JDM content

  • 401: Unauthorized

  • 403: Forbidden — admin role required

  • 409: Name already exists, client_request_id claimed by a different operation, replayed entity gone, or config-managed (this deployment’s rule sets come from its configuration source)

  • 422: Validation failure (validation-failed): a missing client_request_id, an invalid name, version over 64 bytes, or a NUL (U+0000) in version, description, or content

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Get an active rule set by name

GET /v1/rules/sets/by-name/{name}

Table 7. Parameters
Name In Required Description

name

path

Yes

Rule set name (unique)

Responses
  • 200: Rule set found

  • 401: Unauthorized

  • 403: Forbidden

  • 404: Rule set not found

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Get a rule set by ID

GET /v1/rules/sets/{id}

Table 8. Parameters
Name In Required Description

id

path

Yes

Rule set ID

Responses
  • 200: Rule set found

  • 401: Unauthorized

  • 403: Forbidden

  • 404: Rule set not found

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Update a rule set

PUT /v1/rules/sets/{id}

Partial update — only provided fields are changed. Validates JDM if content is updated. Requires admin role.

Table 9. Parameters
Name In Required Description

id

path

Yes

Rule set ID

If-Match

header

Yes

REQUIRED row REVISION from your last read, e.g. "3" or 3 — a stale value 409s instead of rolling the live JDM cache back

Table 10. Request Fields
Field Type Required Description

content

object

No

New JDM content (optional, validated if provided). The same size limits as on create apply; a document past one, or with a NUL (U+0000) in any string or object key, is a 422 validation-failed on this field.

description

string (optional)

No

New description (optional). A NUL (U+0000), which the column cannot store, is a 422 validation-failed on this field.

name

string (optional)

No

New name (optional). When present, same charset as create.

version

string (optional)

No

New version (optional; at most 64 bytes, CODE_MAX). A NUL (U+0000), which the column and change-event payload cannot store, is a 422 validation-failed on this field.

Responses
  • 200: Rule set updated

  • 400: Invalid JDM content, or a missing/malformed If-Match

  • 401: Unauthorized

  • 403: Forbidden — admin role required

  • 404: Rule set not found

  • 409: Name already exists, the revision moved since your read (stale If-Match), or config-managed (this deployment’s rule sets come from its configuration source)

  • 422: A body field whose value does not deserialize, e.g. a non-string name (validation-failed; the field is named, the value never echoed), a name that is not 1-64 lowercase letters, digits, hyphens or underscores, version over 64 bytes, or a NUL (U+0000) in version, description, or content (validation-failed)

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Delete a rule set

DELETE /v1/rules/sets/{id}

Soft-deletes by setting active = false. Requires admin role and a reason query parameter (recorded on the audit snapshot).

Table 11. Parameters
Name In Required Description

id

path

Yes

Rule set ID

reason

query

Yes

Why this rule set is being retired (mandatory; audit-visible on the delete snapshot row). A NUL (U+0000), which the snapshot row cannot store, is a 422 validation-failed on this parameter.

Responses
  • 204: Rule set deleted

  • 400: Missing reason query parameter

  • 401: Unauthorized

  • 403: Forbidden — admin role required

  • 404: Rule set not found

  • 409: config-managed: this deployment’s rule sets come from its configuration source

  • 422: Empty/over-length reason, or a reason containing a NUL (U+0000), which the delete snapshot cannot store (validation-failed naming reason, value-free)

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Export a rule set as a downloadable JSON file

GET /v1/rules/sets/{id}/export

Returns the JDM content as an attachment. Requires admin role.

Table 12. Parameters
Name In Required Description

id

path

Yes

Rule set ID

Responses
  • 200: JDM JSON file

  • 401: Unauthorized

  • 403: Forbidden — admin role required

  • 404: Rule set not found

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Import JDM content into an existing rule set

POST /v1/rules/sets/{id}/import

Replaces the rule set content with the wrapper’s JDM content and auto-generates a timestamp version. The body is the {client_request_id, content} wrapper, not a bare JDM document. Requires admin role.

Table 13. Parameters
Name In Required Description

id

path

Yes

Rule set ID

Table 14. Request Fields
Field Type Required Description

client_request_id

UUID

Yes

Client-minted idempotency id — REQUIRED. Import is a command on the PATH rule set (the claim’s entity is the path id, not a fresh row): same id + identical intent replays without re-importing (the rule set is returned as it now stands — no second version mint, no revision bump); a different intent — including the same content aimed at a different rule set — is a 409 idempotency-conflict.

content

object

Yes

JDM decision model content (GoRules format) — the whole JDM document, verbatim. It may nest at most 32 levels, hold at most 50,000 values, and no string or key longer than 65,536 bytes. A document past a limit, or with a NUL (U+0000) in any string or object key, is a 422 validation-failed on this field.

Responses
  • 200: Rule set content imported (a replay returns the rule set as it now stands — same client_request_id + intent; no second version mint or revision bump)

  • 400: Invalid JDM content

  • 401: Unauthorized

  • 403: Forbidden — admin role required

  • 404: Rule set not found (the claim rolls back — the request id is not burned)

  • 409: client_request_id claimed by a different operation, replayed entity gone, or config-managed (this deployment’s rule sets come from its configuration source)

  • 422: Malformed wrapper body (including a missing client_request_id — a bare JDM document is one) or a NUL (U+0000) in content (validation-failed)

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


POST /v1/rules/sets/{id}/promote

Re-binds the candidate content by canonical hash to the named preview, re-CASes the live revision against the preview’s from_revision INSIDE the flip transaction (409 promote-preview-stale; the preview is never burned), then flips content + version, writes the promote snapshot carrying the canary report as evidence, and stages the invalidation + audit events on the same transaction.

Table 15. Parameters
Name In Required Description

id

path

Yes

Rule set ID

Table 16. Request Fields
Field Type Required Description

acknowledged_thin_corpus

boolean

No

The thin-corpus consent: when the preview’s corpus was below the evidence floor, the flip refuses unless this names the gap explicitly (an empty diff over an empty corpus is NOT evidence — the zero-fault-green class).

client_request_id

UUID

Yes

Client-minted idempotency id — REQUIRED.

content

object

Yes

Candidate JDM content — must hash-match the preview’s binding. The same size limits as the preview’s content apply; a document past one, or with a NUL (U+0000) in any string or object key, is a 422 validation-failed on this field.

preview_id

UUID

Yes

The preview whose evidence this execute consents to.

reason

string

Yes

Why this promotion is happening (recorded on the snapshot; may restate or extend the preview’s reason). A NUL (U+0000), which the column cannot store, is a 422 validation-failed on this field.

version

string

Yes

Must equal the preview’s candidate version. A NUL (U+0000), which the column cannot store, is a 422 validation-failed on this field.

Responses
  • 200: Promoted (a replay returns the rule set as it now stands)

  • 400: Invalid JDM content

  • 401: Unauthorized

  • 403: Forbidden

  • 404: Rule set or preview not found

  • 409: promote-preview-stale (live revision moved; re-preview), promote-preview-mismatch (content/version/target differ from the preview’s binding), thin-corpus-unacknowledged, an idempotency conflict, or config-managed (this deployment’s rule sets come from its configuration source)

  • 422: Validation failure (validation-failed) — a missing client_request_id, an out-of-range version / reason, or a NUL (U+0000) in version, reason, or content

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Enqueue a promotion preview: compile + shadow-canary the candidate as a background job

POST /v1/rules/sets/{id}/promote/preview

Enqueues the promotion preview as the promote_preview background job: the attempt re-reads the live head, replays the last-N real evaluation inputs against live AND candidate on an isolated thread (one cancel checkpoint per item), persists the categorical diff report, and the job’s result is { preview_id, report } — the execute binding. No flip happens here; previews are never burned. The synchronous checks stay synchronous: invalid JDM or the LIVE version string reused with different content is 400, an inactive set 404. Body = the candidate + client_request_id (REQUIRED; the same id replays the SAME job whatever its state, a fresh id is a new job; any field outside the contract is 422 validation-failed). Answers 202 with Location: /v1/rules/jobs/{id} and the job (state = queued); poll the Location until succeeded or failed (error.token closed: engine_failed with detail live-revision-moved when the live revision moved between enqueue and the attempt — re-preview; exhausted after three crashed / interrupted attempts). A second preview of the same rule set while one is queued or running is 409 job-already-active.

Table 17. Parameters
Name In Required Description

id

path

Yes

Rule set ID

Table 18. Request Fields
Field Type Required Description

client_request_id

UUID

Yes

Client-minted idempotency id — REQUIRED: the same id replays the SAME preview job (whatever its state); a fresh id is a new job.

content

object

Yes

Candidate JDM content (GoRules format). It may nest at most 32 levels, hold at most 50,000 values, and no string or key longer than 65,536 bytes. A document past a limit, or with a NUL (U+0000) in any string or object key, is a 422 validation-failed on this field.

reason

string

Yes

Why this promotion is happening (audit-visible; recorded on the preview row and, at execute, the promote snapshot). A NUL (U+0000), which the column cannot store, is a 422 validation-failed on this field.

version

string

Yes

The version string the candidate will carry once promoted. Reusing the LIVE version string with different content is refused (version strings stay human-meaningful even though the revision is the true content key). A NUL (U+0000), which the column cannot store, is a 422 validation-failed on this field.

Responses
  • 202: Preview enqueued (or a replay of the stored job — nothing re-enqueued); Location = /v1/rules/jobs/{id}

  • 400: Invalid JDM content, or the LIVE version string reused with different content

  • 401: Unauthorized

  • 403: Forbidden — requires RuleSet Update AND RuleEvaluation List (the corpus leg replays real evaluation inputs)

  • 404: Rule set not found

  • 409: A preview of this rule set is already queued or running (job-already-active), or this client_request_id was used with a different intent (idempotency-conflict)

  • 422: Validation failure — a missing client_request_id, a forged field, an out-of-range version / reason, or a NUL (U+0000) in version, reason, or content (validation-failed)

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Roll back to a snapshotted revision (as a NEW revision)

POST /v1/rules/sets/{id}/rollback

Restores the content + version of the snapshot at (this rule set, target_revision) as a NEW revision — monotone history, the counter never rewinds. No canary (the target content previously served); the content is compile-revalidated because the engine may have moved since the snapshot’s vintage. Refuses on soft-deleted rule sets (recreate is the path — the rebinding doctrine).

Table 19. Parameters
Name In Required Description

id

path

Yes

Rule set ID

Table 20. Request Fields
Field Type Required Description

client_request_id

UUID

Yes

Client-minted idempotency id — REQUIRED.

expected_revision

integer

Yes

The live revision this rollback expects to move FROM (the CAS — a concurrent mutation 409s instead of silently compounding).

reason

string

Yes

Why this rollback is happening (mandatory; an unexplained rollback of eligibility policy is itself an audit finding). A NUL (U+0000), which the column cannot store, is a 422 validation-failed on this field.

target_revision

integer

Yes

The snapshot revision to restore — resolved by the FULL (rule_set_id, revision) token (the path id + this), never by name (a delete and recreate rebinds a name).

Responses
  • 200: Rolled back (a replay returns the rule set as it now stands)

  • 400: The snapshot’s content no longer compiles under the current engine

  • 401: Unauthorized

  • 403: Forbidden

  • 404: Rule set (or an inactive one), or no snapshot at target_revision

  • 409: The live revision moved since expected_revision (re-read and retry), an idempotency conflict, or config-managed (this deployment’s rule sets come from its configuration source)

  • 422: Validation failure (validation-failed) — a missing client_request_id, an out-of-range target_revision / expected_revision / reason, or a NUL (U+0000) in reason

  • 500: Internal error

  • 503: Service Unavailable (RFC 9457 problem document): database pool exhaustion (carries Retry-After: 5), db-connection-lost, db-outcome-unknown, or a synchronous upstream dependency refusal.

  • 504: Gateway Timeout (RFC 9457 problem document): the route-class request ceiling elapsed (request-timeout) or the database canceled the statement (db-timeout) — the server yields first.


Edit this page · latest