Governance API
The governance API lets your own systems, such as a GRC tool, a CMDB or a compliance pipeline, read the governance, inventory and policy records that ANTS Platform keeps:
- Agents and their governance profiles
- Framework coverage per compliance framework for a project
- Guardrail policies, one per agent
- The AI tool registry used by Discover AI
- Sanctions: the sanction status of each AI tool
- Model approvals from the AI Inventory
It can also change three kinds of record: an agent's governance profile, an agent's guardrail policy, and a tool's sanction status. Writes use the same validation and side effects as the app.
Every read and every write is recorded in the audit log.
The API is off by default. Your ANTS deployment must have it turned on, and an organization admin must turn it on for the organization. See Turn it on. Writes also need an organization key with Governance write.
Base path
All governance endpoints live under:
Use the same host as the rest of the public API. Paths on this page are relative to /api/public/v1/governance.
Turn it on
Three conditions must all hold before the API returns data. If any one is missing, every governance endpoint answers 404.
| Condition | Where | Default |
|---|---|---|
| The deployment allows the governance public API | Your ANTS deployment must have the governance public API turned on; ask your ANTS administrator. | Off |
| The organization has turned it on | Organization Settings → Features → Governance public API | Off |
| The organization's plan includes Enterprise governance | Billing & Plans (Enterprise plans) |
Organization API keys also need the organization API keys and Admin API entitlement (admin-api, Enterprise plans). Project keys do not.
Check that the deployment allows it
The Governance public API row appears on the Features tab only when your deployment has the API turned on. If you do not see it, ask your ANTS administrator.
Turn on the setting
Open Organization Settings → Features and turn on Governance public API. If your deployment uses step-up verification, you are asked for the code sent to your email.
Choose the access
Once the API is on, an Access selector appears under it:
- Read only (the default): keys can read, and every write answers
403. - Read and write: organization keys that have Governance write turned on can change sanctions, guardrail policies and governance profiles.
Switching to Read and write also asks for step-up verification when it is enabled.
Allow specific keys to write
Read and write mode on its own lets no key write. Open Organization Settings → API Keys and turn on Governance write for each organization key that should be able to change governance data. The column is shown only when your deployment has the API turned on. Turning it on for a key asks for step-up verification when it is enabled.
Who can change these settings
| Setting | Permission | Built-in roles |
|---|---|---|
| Governance public API and Access | tenantSecurity.features:admin | Owner and Security & Compliance |
| Governance write on an organization key | organization:CRUD_apiKeys | Owner |
A custom role grants the first through Organization features & MFA at the Admin level.
Turning the API off, switching back to Read only, and turning Governance write off for a key do not ask for step-up. Turning the API off also resets the access to Read only, so turning it back on never restores write access by itself. Governance write is off for every key until an admin turns it on, including keys created before the API was available.
Every change to these settings is written to the audit log.
Authentication
Use HTTP Basic auth with an API key pair, the same as the rest of the public API: the public key (pk-ap-...) as the username and the secret key (sk-ap-...) as the password. See Authentication.
Which key to use
| Endpoints | Project key | Organization key |
|---|---|---|
| Project reads: agents, governance profiles, guardrail policies, framework coverage | Reads its own project. projectId is optional; if you send it, it must be the key's project, otherwise 403. | projectId is required (400 without it) and must be a project of the key's organization, otherwise 404. |
| Organization reads: AI tools, sanctions, model approvals | 403 | Allowed |
| All writes | 403 | Allowed only for a key with Governance write on, while the access is Read and write |
Every write needs an organization key. Project keys live in application code next to the agents they belong to, so a leaked project key cannot loosen its own agent's guardrail policy, change its risk tier or sanction a tool for the whole organization.
Other credentials, such as Discover AI enrollment keys, are refused with 403. On a deployment where project keys are limited to trace ingestion, project keys are refused with 403 here too; organization keys still work.
Pagination
Every list endpoint takes:
| Parameter | Description |
|---|---|
page | Page number, starting at 1. Default 1. |
limit | Items per page, 1 to 100. Default 50. |
and returns:
A page past the end returns an empty data list. Timestamps are ISO 8601 strings in UTC.
Endpoints
Agents
| Method | Path | Purpose | Key |
|---|---|---|---|
GET | /agents | List the agents of a project | Project or organization |
GET | /agents/{agentId} | Get one agent | Project or organization |
Query parameters for GET /agents, besides page, limit and projectId:
| Parameter | Description |
|---|---|
search | Case-insensitive match on the name or display name |
riskTier | UNACCEPTABLE, HIGH, LIMITED, MINIMAL or NOT_CLASSIFIED |
stage | Deployment stage from the governance profile, case-insensitive |
platform | Platform as returned in platform, for example sdk, aws-bedrock or google-vertex |
Agents are ordered by name, then by ID.
| Field | Meaning |
|---|---|
id | The agent ID |
name | The agent's system name |
displayName | The display name, or the name when none is set |
platform | Where the agent runs: aws-bedrock or google-vertex for agents found in a cloud inventory, otherwise the platform its tags point to (such as crewai, claude-code, codex, copilot or cowork), otherwise sdk |
governanceStatus | The governance profile status (DRAFT, PENDING_REVIEW, CHANGES_REQUESTED, APPROVED or ARCHIVED), or null when the agent has no profile |
owner, purpose, riskTier, stage | Owning team, business purpose, EU AI Act risk tier and deployment stage from the governance profile |
models | Models the agent called in the last 24 hours. null when usage data is temporarily unavailable. |
lastActiveAt | Last traced activity in the last 24 hours, or null |
declaredTools | Tools declared on the governance profile |
dataSources | Inference-time data sources from the governance profile |
Agent tags are not returned.
Governance profiles
| Method | Path | Purpose | Key |
|---|---|---|---|
GET | /agents/{agentId}/profile | Get an agent's governance profile | Project or organization |
PATCH | /agents/{agentId}/profile?projectId=... | Update profile fields | Organization, with Governance write |
GET answers 404 when the agent has no governance profile. See Evidence Collection and Compliance for what the fields mean.
| Field | Meaning |
|---|---|
agentId, projectId | Identity |
status | DRAFT, PENDING_REVIEW, CHANGES_REQUESTED, APPROVED or ARCHIVED |
riskTier | UNACCEPTABLE, HIGH, LIMITED, MINIMAL or NOT_CLASSIFIED |
euAiActClassification, euAiActAnnexIiiCategory | From the risk classification evidence |
useCaseName, owner, purpose, stage | From the use case evidence |
dataSources, trainingDataSource, dataOwnerName, dataOwnerEmail | From the data governance evidence |
declaredTools | Declared tools. Set them in the app on the agent's profile card; PATCH does not change them. |
selectedFrameworks | Any of EU_AI_ACT, ISO_42001, NIST_AI_RMF, SOC_2, ISO_27001, NIST_CSF_2 |
coveragePercentage | Share of evidence filled in, 0 to 100 |
frameworkCoverage | Per selected framework: total, complete and percentage |
activeDriftAlerts | Number of open drift alerts |
approvedAt, createdAt, updatedAt | Timestamps |
Update a governance profile
Send only the fields to change. At least one is required, and unknown fields are refused with 400.
| Field | Description |
|---|---|
owner | Owning team, up to 500 characters |
purpose | Business purpose, up to 5,000 characters |
stage | Deployment stage, up to 100 characters. null clears it. |
dataSources | Inference-time data sources, up to 100 entries of up to 500 characters. Replaces the whole list. |
riskTier | UNACCEPTABLE, HIGH, LIMITED, MINIMAL or NOT_CLASSIFIED |
The response is the updated profile, in the same shape as GET. The profile must already exist; create it in the app. Coverage and framework compliance are recalculated as they are when you edit the profile in the app. If the profile has no use case evidence (for owner, purpose or stage) or no data governance evidence (for dataSources), the request answers 404 and nothing is changed.
Framework coverage
| Method | Path | Purpose | Key |
|---|---|---|---|
GET | /framework-coverage | Compliance coverage per framework across a project's agents | Project or organization |
This is the per-framework block of the governance dashboard. It returns one entry for each framework (EU_AI_ACT, ISO_42001, NIST_AI_RMF, SOC_2, ISO_27001, NIST_CSF_2), or an empty list when no agent in the project has a governance profile. It is not paginated.
A requirement counts as completed when every agent with a record for it has it complete, as partial when it has records but not all are complete, and as a gap when no agent has a record for it.
Guardrail policies
Guardrail policies are set per agent. There is no project-wide policy. See AI Guardrails.
| Method | Path | Purpose | Key |
|---|---|---|---|
GET | /guardrail-policies | List a project's guardrail policies | Project or organization |
GET | /agents/{agentId}/guardrail-policy | Get an agent's guardrail policy | Project or organization |
PUT | /agents/{agentId}/guardrail-policy?projectId=... | Create or update an agent's guardrail policy | Organization, with Governance write |
GET /guardrail-policies takes enabled (true or false) to filter on whether real-time enforcement is on, besides page, limit and projectId. Policies are ordered by agent name, then by ID. GET /agents/{agentId}/guardrail-policy answers 404 when the agent has no policy.
| Field | Meaning |
|---|---|
id, projectId, agentName | Identity |
agentId | The agent ID, or null for a policy saved before the agent first sent data |
enabled | Whether real-time enforcement is on |
action | ALLOW (Audit Only) or ENFORCE |
redactEnabled | With ENFORCE, mask detected values instead of blocking |
categoryActions | Actions set per category, as stored, or null when the policy uses one action for every category |
effectiveCategoryActions | The action each category actually gets: its own action, or the policy's single action when it has none |
labels | Selected detection labels per category |
minConfidenceScore | Detection threshold, 0 to 1 |
blockedMessage | The Blocked Response Message, or null |
deploymentMode | ANTS_HOSTED or SELF_HOSTED |
Create or update a guardrail policy
Send only the fields to change. At least one is required, and unknown fields are refused with 400.
| Field | Description |
|---|---|
enabled | Turn real-time enforcement on or off |
action | ALLOW or ENFORCE |
redactEnabled | With ENFORCE, mask values instead of blocking |
categoryActions | An action per category: pii, pci, phi, ethicsBias, safety, each AUDIT_ONLY, WARN, REDACT or BLOCK. REDACT is accepted only for pii, pci and phi. null removes the per-category actions so the single action applies to every category. |
labels | An object with any of pii, pci, phi, ethicsBias and safety. Each list you send replaces the stored list for that category; up to 200 labels of up to 100 characters each. Use the label names the policy editor uses, such as person, email or credit card number. |
minConfidenceScore | 0 to 1 |
blockedMessage | Up to 2,000 characters. null clears it. |
The response is the saved policy, in the same shape as GET. The agent must exist in the project. If it has no policy yet, one is created from the app's defaults: real-time enforcement off, Audit Only, no labels and a confidence threshold of 0.5. Settings the API does not manage, such as the Scheduled Detection schedule, PagerDuty alerting and custom detectors, are kept as they are. The SDK policy cache is refreshed, so SDKs pick up the change on their next policy lookup.
AI tool registry
| Method | Path | Purpose | Key |
|---|---|---|---|
GET | /ai-tools | List the AI tools in the registry and the organization's custom apps | Organization |
Query parameters, besides page and limit:
| Parameter | Description |
|---|---|
source | catalog, custom or all (default) |
search | Case-insensitive match on the name or display name |
Catalog tools are the approved Tool Registry entries visible to the organization; where the organization has its own version of a tool, that version is returned. Custom apps are the organization's internal AI apps and tracked apps. Tools are ordered by display name, then by ID.
| Field | Meaning |
|---|---|
id | The catalog tool ID (a stable slug) or the custom app ID |
source | catalog or custom |
name, displayName, category, subCategory | Description |
vendor, vendorWebsite, vendorHqCountry, dataResidencyNotes | Vendor details, for catalog tools |
riskLevel, riskRationale | Catalog risk. null for custom apps. |
builtIn | Whether the tool ships with the product |
kind | internal_ai or tracked_app, for custom apps |
primaryDomain, domains | Custom apps only |
createdAt, updatedAt | Timestamps |
Detection rules (URL patterns, API hosts, bundle IDs, paths), intercept patterns, request notes, who requested or approved a catalog entry, and any device, user or usage data are not returned.
Sanctions
| Method | Path | Purpose | Key |
|---|---|---|---|
GET | /sanctions | List the sanction status of AI tools | Organization |
PUT | /sanctions | Set the sanction status of one AI tool | Organization, with Governance write |
GET takes status (SANCTIONED, TOLERATED or UNSANCTIONED) besides page and limit. Only tools that have a sanction set are listed. Sanctions are ordered by tool name.
| Field | Meaning |
|---|---|
provider | The tool name |
status | SANCTIONED, TOLERATED or UNSANCTIONED |
riskLevel | low, medium, high or null |
note | The admin note, or null |
updatedAt | Last change |
Set a sanction
| Field | Required | Description |
|---|---|---|
provider | Yes | The tool name as shown in the Discover AI inventory, 1 to 120 characters |
status | Yes | SANCTIONED, TOLERATED or UNSANCTIONED |
riskLevel | No | low, medium or high |
note | No | Up to 1,000 characters |
The sanction applies to the whole organization. As in the app, riskLevel and note are replaced on every write, so leaving them out clears them. The change has the same effects as in the app: cached usage reports are refreshed and, while Warn mode is on, browser extensions pick up the new policy on their next check.
Model approvals
| Method | Path | Purpose | Key |
|---|---|---|---|
GET | /model-approvals | List the organization's model approval records | Organization |
status filters on approved or not_approved, besides page and limit. Only models with an approval record are listed; models never reviewed are not. Records are ordered by when they were created, oldest first.
| Field | Meaning |
|---|---|
id | The approval record ID |
model | The model key |
modelName, provider, family | Model description |
lifecycleStatus | current, deprecated or archived |
status | approved or not_approved |
approvedBy | The approver's user ID, or null. Names and email addresses are not returned. |
approvedAt, updatedAt | Timestamps |
Approving or revoking models is done in the app.
Rate limit
Each API key can make 60 requests per minute across all governance endpoints by default. Your ANTS administrator can set a different limit for the deployment.
Above the limit the API answers 429 with these headers:
and this body:
Requests refused before the limit is checked (404, 401, and the 403 key, mode and permission checks) do not count. If the rate limiter cannot be reached, reads are still served, and writes answer 503 so that no write goes through without a limit.
Errors
Errors return a JSON body with a message field and an error field:
| Status | Meaning |
|---|---|
400 | The request is invalid: a parameter or body field fails validation, an unknown body field was sent, no field was sent to an update, or projectId is missing with an organization key. For validation errors message is Invalid request data and error lists the problems. |
401 | The Authorization header is missing or the key is invalid or expired. |
403 | The key may not do this: a project key on an organization endpoint or on a write, a project key asking for another project, a project key on an ingestion-only deployment, a key type that is not a project or organization API key, a write while the access is Read only, or a write with a key that does not have Governance write. The message says which. |
404 | The API is not available: it is off for the deployment or the organization, or the organization's plan does not include it. Also returned when the project, agent, governance profile, evidence or guardrail policy is not found in the key's scope. |
405 | The method is not supported on this path. |
429 | The key's per-minute rate limit is spent. Retry after Retry-After seconds. |
500 | Server error. This includes the case where the audit log entry cannot be written: a read then returns no data, and a write is rolled back. |
503 | A write was refused because the rate limiter cannot be reached. Try again shortly. |
A 404 is used for every "not available" case, so a caller cannot tell from outside whether the API exists for an organization. When the deployment has the API on, an invalid key gets 401 before the organization settings are checked.
Auditing
Every request that returns data or changes data is recorded in Audit Logs. The actor is the API key. Refused requests are not recorded.
Reads. Each successful read writes one entry, with no sampling, before the response is sent. If the entry cannot be written, the request fails with 500 and no data is returned.
| Column | Value |
|---|---|
| Resource Type | governancePublicApi |
| Resource ID | The endpoint, such as governance.agents.list or governance.sanctions.list |
| Action | read |
| Project | The project read, for project endpoints |
| After | endpoint (method and endpoint), keyType (project or organization), projectId, query (the parameters used), count (records returned) and recordIds (the ID of every record returned) |
So for any key you can see which project and which records were read, and when.
Writes. Each change is saved in the same database transaction as its audit entry. If the entry cannot be written, the change is rolled back and the request fails with 500.
| Write | Resource Type | Resource ID | Action | Before and After |
|---|---|---|---|---|
| Set a sanction | shadowAiAppSanction | Tool name | create or update | Tool, status, risk level, note and time of change |
| Create or update a guardrail policy | piiPciConfig | Policy ID | create or update | The policy, in the API's response shape |
| Change the risk tier | governanceProfile | Profile record ID | update | The governance profile record |
| Change owner, purpose, stage or data sources | governanceEvidence | Profile record ID | update | The evidence record |
A profile update that changes both the risk tier and other fields writes both entries in one transaction.
Settings. Turning the API on or off and changing the access write an entry with resource type governancePublicApi and action governancePublicApi.enable, governancePublicApi.disable, governancePublicApi.modeReadWrite or governancePublicApi.modeReadOnly, with the user as actor and the settings before and after. Turning Governance write on or off for a key writes an apiKey entry with action governanceWrite.grant or governanceWrite.revoke.
For organization keys, the Actor column shows the key's ID rather than its public key.
Limits
Never returned by any governance endpoint: prompt or response content, trace input and output, detection evidence text, secrets and credentials, API keys, device identifiers, user activity and agent tags. Governance profiles do not include the other evidence categories (human oversight, security, bias, transparency, legal accountability), attestations, requester and approver user IDs, or document links. Guardrail policies do not include PagerDuty or schedule settings.
Not available through this API; use the app:
- Turning the API on or off, changing its access, and allowing a key to write.
- Creating or deleting governance profiles, editing other evidence, attestations, and the review workflow (submit, approve, request changes).
- Drift alerts, policy violations and guardrail detections.
- Deleting a guardrail policy, and its schedule, PagerDuty and custom detector settings.
- Clearing a sanction. Set it to
UNSANCTIONEDinstead. - Approving or revoking models, and the model and framework catalogs.
- Adding, editing or requesting AI tools and custom apps.
- Discover AI usage, users, devices and enrollment.
- Budget AI keys, budgets and model groups.
Traces, observations, sessions, scores, prompts, projects, memberships and the other resources listed in the API Reference are available through the rest of the public API.