Scheduled re-validation of historical documents against current rules

Governance


Governance sets define scheduled re-validation jobs that periodically re-run historical documents through the current validation rules of a document type. This catches documents that passed older rules but would fail updated ones.

Governance Set Object

idstring
UUID of the governance set.
tenant_idstring
namestring
Human-readable name for this governance set.
context_idstring
Document type ID to validate documents against.
schedulestring
Cron-style or named schedule (e.g. "daily", "weekly").
enabledboolean
Whether this set runs on its configured schedule.
configobject
Additional configuration (filters, thresholds, etc.).
last_run_atstring
ISO 8601 timestamp of the most recent run.
created_atstring

Governance Run Object

idstring
UUID of the run.
governance_idstring
Parent governance set UUID.
statusstring
running, completed, failed
total_docsnumber
Total documents evaluated in this run.
passednumber
Number of documents that passed all current rules.
failednumber
Number of documents that failed one or more rules.
error_countnumber
Number of documents that errored during re-evaluation.
summaryobject
Aggregated summary of failures by field and rule.
started_atstring
completed_atstring

Governance Result Object

idstring
UUID of the per-document result.
doc_idstring
UUID of the evaluated document.
session_idstring
UUID of the case the document belongs to.
statusstring
pass or fail
field_resultsobject
Per-field rule evaluation results.

Endpoints

Create Governance Set

POST /v1/governance

Requires scope: write. Returns 201.

Request body:

namestringrequired

Human-readable name (e.g. "Daily PAN Card Validation").

context_idstringrequired

Document type ID to validate against.

tenant_idstring
schedulestring

Run schedule. Default "daily".

configobject

Additional configuration (e.g. document filters, lookback window).

enabledboolean

Whether to enable the schedule immediately. Default true.

Example request:

{
  "name": "Daily PAN Card Validation",
  "context_id": "pan_card",
  "tenant_id": "acme-corp",
  "schedule": "daily",
  "enabled": true
}

Response (201): Governance Set object.


List Governance Sets

GET /v1/governance

Requires scope: read.

Query parameters:

tenant_idstring

Filter by tenant.

Response (200): Array of Governance Set objects.


List Governance Runs

GET /v1/governance/{governance_id}/runs

Requires scope: read. Returns the run history for a governance set, newest first.

governance_idstringrequired
UUID of the governance set.
limitnumber
Maximum runs to return. Default 20.

Response (200): Array of Governance Run objects.


List Run Results

GET /v1/governance/runs/{run_id}/results

Requires scope: read. Returns per-document results for a specific governance run.

run_idstringrequired
UUID of the governance run.
statusstring

Filter results by status: "pass" or "fail". Returns all if empty.

Response (200): Array of Governance Result objects.


Trigger Governance Run

POST /v1/governance/{governance_id}/trigger

Requires scope: write. Manually triggers an immediate governance run without waiting for the schedule. The run executes asynchronously in the background.

governance_idstringrequired
UUID of the governance set to run.

Response (202):

{
  "status": "triggered",
  "governance_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Returns 404 if the governance set does not exist.