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
idstringtenant_idstringnamestringcontext_idstringschedulestring"daily", "weekly").enabledbooleanconfigobjectlast_run_atstringcreated_atstringGovernance Run Object
idstringgovernance_idstringstatusstringrunning, completed, failedtotal_docsnumberpassednumberfailednumbererror_countnumbersummaryobjectstarted_atstringcompleted_atstringGovernance Result Object
idstringdoc_idstringsession_idstringstatusstringpass or failfield_resultsobjectEndpoints
Create Governance Set
POST /v1/governance
Requires scope: write. Returns 201.
Request body:
namestringrequiredHuman-readable name (e.g. "Daily PAN Card Validation").
context_idstringrequiredDocument type ID to validate against.
tenant_idstringschedulestringRun schedule. Default "daily".
configobjectAdditional configuration (e.g. document filters, lookback window).
enabledbooleanWhether 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_idstringFilter 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_idstringrequiredlimitnumber20.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_idstringrequiredstatusstringFilter 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_idstringrequiredResponse (202):
{
"status": "triggered",
"governance_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Returns 404 if the governance set does not exist.