Governance
Every endpoint on this page needs a Keycloak access token with the admin platform role, except the detector manifest, which any signed-in user can read. See Policy for how the rules work.
List custom policies
/governance/custom-policiesResponse fields
policiesarrayoptionalid, name, description, effect, action, conditions, enabled, created_at, created_by, updated_at and updated_by.revisionstringoptionalcatalogobjectoptionalapproval_fieldsarrayoptional/governance/custom-policies/statusWhether OPA has loaded the current rules. Returns api_revision, opa_revision and in_sync.
Create a custom policy
/governance/custom-policiesSaves a rule. OPA loads it on its next poll. Recorded in the audit log as custom_policy.create.
Body
namestringrequiredeffectstringrequireddeny, require_approval or allow. require_approval and allow work only with call_tool.actionstringrequiredcall_tool, chat, embed, transcribe, speak, deploy_model or verify_model_integrity.conditionsobjectoptionalallow rule must have a project_id condition.descriptionstringoptionalenabledbooleanoptionaltrue. A disabled rule is saved but not sent to OPA./governance/custom-policies/{policy_id}Replaces a rule. Same body. Recorded as custom_policy.update.
/governance/custom-policies/{policy_id}Deletes a rule. Recorded as custom_policy.delete.
Responses
detail says why.Test a request
/governance/custom-policies/testAsks OPA what it would decide for a request you describe. Nothing is written to the audit log.
Body
actionstringrequiredresourceobjectoptionaltool_name and project_id.Response fields
allowbooleanoptionalrequires_approvalboolean or nulloptionalcall_tool, whether the call would wait for a person. null for other actions.matched_policy_idsarrayoptionalopa_revisionstring or nulloptionalExport and import
/governance/custom-policies/exportEvery custom policy, in the file format the import accepts. Ids are kept, so re-importing an edited export updates rules instead of duplicating them.
/governance/custom-policies/importReplaces the whole set with the file's policies. A policy missing from the file is deleted. Every policy is checked first, so a file with one bad entry changes nothing. Recorded as custom_policy.import.
Query parameters
dry_runbooleanoptionaltrue to see what would change without changing it.Body
formatstringrequiredvois-orchestrate.custom-policies/v1.policiesarrayrequiredid.Response fields
createdarrayoptionalupdatedarrayoptionaldeletedarrayoptionaldry_runbooleanoptionalRead the rules in force
/governance/policiesThe policy data OPA is deciding with, read from OPA. data has the baseline's write_tools and write_tool_allowed_projects. custom_policies_revision is the custom rule set OPA has loaded, or null if none.
/governance/guardrailsThe PII guardrail configuration the Model Gateway is enforcing. Same response as the gateway's GET /guardrails/config.
/guardrails/detectorWhat the PII detector checks and does not check, for this release. Any signed-in user. Pass detector with the value from a scan report, such as vois-bundled-ruleset@1.0.0. If it does not match this release's detector, the response is 409.
Responses
detail says which.List blocked actions
/governance/blockedEverything the platform refused, newest first, read from the audit log, with a reason for each.
Query parameters
limitintegeroptionaloffsetintegeroptionalResponse fields
items[].sequenceintegeroptionalitems[].created_atstringoptionalitems[].actorstringoptionalitems[].actionstringoptionalitems[].targetstringoptionalitems[].sourcestringoptionalpolicy, guardrail or approval.items[].reasonstringoptionalhas_morebooleanoptionalList pending approvals
/governance/pending-approvalsTool calls in every project that are waiting for a person, found in the audit log and confirmed against the runs.
Query parameters
daysintegeroptionalResponse fields
approvals[]objectoptionalworkflow_id, approval_id, tool_name, step, project_id, requested_by, requested_at, expires_at and status. status is pending, or unconfirmed if the run could not be asked.truncatedbooleanoptionaltrue if there were too many requests to read them all. truncated_reason explains.countsobjectoptionalTo decide one, use POST /workflow-runs/{workflow_id}/approvals/{approval_id}.
Guardrail profiles
See Guardrail profiles for the profile document and how a profile is chosen.
| Method and path | Who | What it does |
|---|---|---|
GET /guardrails/profiles?project_id= | any signed-in user | The install-wide profiles, and the project's own. |
POST /guardrails/profiles | project admin; platform admin for an install-wide profile | Body: project_id (none for install-wide), name, description, is_default, config. |
PATCH /guardrails/profiles/{profile_id} | the same | Change a profile. |
DELETE /guardrails/profiles/{profile_id} | the same | Delete a profile. 409 while it is assigned or an organization's default. |
GET /projects/{project_id}/agents/{agent_name}/guardrails | viewer | The agent's assignments and the profile that is in effect. |
PUT /projects/{project_id}/agents/{agent_name}/guardrails | project admin | {"profile_id", "version_id"}: assign a profile to the agent, or to one version. |
GET /guardrails/detectors | any signed-in user | The PII and prompt-injection detectors this install runs, their versions, packs and rules. |
Model access
See Model access.
| Method and path | Who | What it does |
|---|---|---|
GET /model-access | any signed-in user | Every model access policy. |
GET /model-access/{model} | any signed-in user | One policy, by catalog id or model name. |
PUT /model-access/{model} | platform admin | {"restricted": true, "allowed_projects": ["support", "billing"]}. Takes effect at the Model Gateway within about 15 seconds. |
GET /projects/{project_id}/model-access | viewer | Every model, and whether this project may use it. |