ArthurAI Policies V1 API
The Policies V1 API from ArthurAI — 22 operation(s) for policies v1.
The Policies V1 API from ArthurAI — 22 operation(s) for policies v1.
openapi: 3.1.0
info:
title: Arthur GenAI Engine Agent Discovery Policies V1 API
version: 2.1.688
tags:
- name: Policies V1
paths:
/api/v1/models/{model_id}/assignments:
get:
tags:
- Policies V1
summary: List Model Policy Assignments
description: Lists all policy assignments for an application including policy summary and compliance status. Requires model_list_policy_assignments permission.
operationId: list_model_policy_assignments
security:
- OAuth2AuthorizationCode:
- model_list_policy_assignments
parameters:
- name: model_id
in: path
required: true
schema:
type: string
format: uuid
title: Model Id
- name: assignment_id
in: query
required: false
schema:
type: string
format: uuid
description: Optional assignment ID to filter by.
title: Assignment Id
description: Optional assignment ID to filter by.
- name: name
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by policy name (case-insensitive partial match).
title: Name
description: Filter by policy name (case-insensitive partial match).
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
description: The page to return starting from 1 up to total_pages.
default: 1
title: Page
description: The page to return starting from 1 up to total_pages.
- name: page_size
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: The number of records per page. The max is 1000.
default: 20
title: Page Size
description: The number of records per page. The max is 1000.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceList_PolicyAssignment_'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/models/{model_id}/check_compliance:
post:
tags:
- Policies V1
summary: Check Model Compliance
description: Enqueues a Metrics → Alerts → Compliance chain for all assignments on this model. The window is taken from the request body's start_timestamp / end_timestamp. Requires model_check_compliance permission.
operationId: check_model_compliance
security:
- OAuth2AuthorizationCode:
- model_check_compliance
parameters:
- name: model_id
in: path
required: true
schema:
type: string
format: uuid
title: Model Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsCalculationJobSpec'
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/JobsBatch'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/models/{model_id}/attestations:
get:
tags:
- Policies V1
summary: List Model Attestations
description: Lists all attestations across all policy assignments for an application. Requires model_list_attestations permission.
operationId: list_model_attestations
security:
- OAuth2AuthorizationCode:
- model_list_attestations
parameters:
- name: model_id
in: path
required: true
schema:
type: string
format: uuid
title: Model Id
- name: latest
in: query
required: false
schema:
type: boolean
description: If true, only return the most recent attestation for each rule.
default: false
title: Latest
description: If true, only return the most recent attestation for each rule.
- name: valid
in: query
required: false
schema:
type: boolean
description: If true, only return attestations that have not expired.
default: false
title: Valid
description: If true, only return attestations that have not expired.
- name: policy_assignment_id
in: query
required: false
schema:
type: string
format: uuid
description: Optional policy assignment ID to filter attestations by.
title: Policy Assignment Id
description: Optional policy assignment ID to filter attestations by.
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
description: The page to return starting from 1 up to total_pages.
default: 1
title: Page
description: The page to return starting from 1 up to total_pages.
- name: page_size
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: The number of records per page. The max is 1000.
default: 20
title: Page Size
description: The number of records per page. The max is 1000.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceList_AttestationRecord_'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/workspaces/{workspace_id}/policy_assignments:
get:
tags:
- Policies V1
summary: List Workspace Policy Assignments
description: Lists all policy assignments within a workspace, filtered to applications the caller can access. Requires workspace_list_policy_assignments permission.
operationId: list_workspace_policy_assignments
security:
- OAuth2AuthorizationCode:
- workspace_list_policy_assignments
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: policy_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter by policy ID.
title: Policy Id
description: Filter by policy ID.
- name: compliance_status
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/ComplianceStatus'
- type: 'null'
description: Filter by compliance status.
title: Compliance Status
description: Filter by compliance status.
- name: name
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by policy name (case-insensitive partial match).
title: Name
description: Filter by policy name (case-insensitive partial match).
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
description: The page to return starting from 1 up to total_pages.
default: 1
title: Page
description: The page to return starting from 1 up to total_pages.
- name: page_size
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: The number of records per page. The max is 1000.
default: 20
title: Page Size
description: The number of records per page. The max is 1000.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceList_PolicyAssignment_'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/workspaces/{workspace_id}/compliance:
get:
tags:
- Policies V1
summary: List Workspace Compliance
description: Returns a flat compliance table with per-rule, per-model status across all policies in a workspace. Requires workspace_list_policy_compliance permission.
operationId: list_workspace_compliance
security:
- OAuth2AuthorizationCode:
- workspace_list_policy_compliance
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: compliance_status
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/ComplianceRuleStatusFilter'
- type: 'null'
description: 'Filter by rule compliance status: ''COMPLIANT'' or ''NON_COMPLIANT''.'
title: Compliance Status
description: 'Filter by rule compliance status: ''COMPLIANT'' or ''NON_COMPLIANT''.'
- name: model_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter to a specific model.
title: Model Id
description: Filter to a specific model.
- name: policy_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter to a specific policy.
title: Policy Id
description: Filter to a specific policy.
- name: rule_type
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/ComplianceRuleType'
- type: 'null'
description: 'Filter by rule type: ''alert_rule'' or ''attestation_rule''.'
title: Rule Type
description: 'Filter by rule type: ''alert_rule'' or ''attestation_rule''.'
- name: rule_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter to rows for a specific rule.
title: Rule Id
description: Filter to rows for a specific rule.
- name: frequency
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: Filter attestation rules by validity period in days.
title: Frequency
description: Filter attestation rules by validity period in days.
- name: search
in: query
required: false
schema:
anyOf:
- type: string
maxLength: 200
- type: 'null'
description: Search across rule, model, and policy names (case-insensitive).
title: Search
description: Search across rule, model, and policy names (case-insensitive).
- name: sort
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 'Sort field: rule_name, rule_type, compliance_status, updated_at, created_at.'
title: Sort
description: 'Sort field: rule_name, rule_type, compliance_status, updated_at, created_at.'
- name: order
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/SortOrder'
- type: 'null'
description: 'Sort order: asc or desc.'
title: Order
description: 'Sort order: asc or desc.'
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
description: The page to return starting from 1 up to total_pages.
default: 1
title: Page
description: The page to return starting from 1 up to total_pages.
- name: page_size
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: The number of records per page. The max is 1000.
default: 20
title: Page Size
description: The number of records per page. The max is 1000.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ComplianceResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/workspaces/{workspace_id}/check_compliance:
post:
tags:
- Policies V1
summary: Check Workspace Policies Compliance
description: Enqueues a Metrics → Alerts → Compliance chain for every model with policy assignments in the workspace. Returns one job per model. Requires workspace_check_all_policies_compliance permission.
operationId: check_workspace_policies_compliance
security:
- OAuth2AuthorizationCode:
- workspace_check_all_policies_compliance
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsCalculationJobSpec'
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/JobsBatch'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/organization/policy_assignments:
get:
tags:
- Policies V1
summary: List Organization Policy Assignments
description: Lists all policy assignments across every workspace in the organization, filtered to applications the caller can access. Requires organization_list_policy_assignments permission.
operationId: list_organization_policy_assignments
security:
- OAuth2AuthorizationCode:
- organization_list_policy_assignments
parameters:
- name: policy_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter by policy ID.
title: Policy Id
description: Filter by policy ID.
- name: compliance_status
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/ComplianceStatus'
- type: 'null'
description: Filter by compliance status.
title: Compliance Status
description: Filter by compliance status.
- name: name
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by policy name (case-insensitive partial match).
title: Name
description: Filter by policy name (case-insensitive partial match).
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
description: The page to return starting from 1 up to total_pages.
default: 1
title: Page
description: The page to return starting from 1 up to total_pages.
- name: page_size
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: The number of records per page. The max is 1000.
default: 20
title: Page Size
description: The number of records per page. The max is 1000.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceList_PolicyAssignment_'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/organization/compliance:
get:
tags:
- Policies V1
summary: List Organization Compliance
description: Returns a flat compliance table with per-rule, per-model status across all policies in every workspace in the organization. Requires organization_list_policy_compliance permission.
operationId: list_organization_compliance
security:
- OAuth2AuthorizationCode:
- organization_list_policy_compliance
parameters:
- name: compliance_status
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/ComplianceRuleStatusFilter'
- type: 'null'
description: 'Filter by rule compliance status: ''COMPLIANT'' or ''NON_COMPLIANT''.'
title: Compliance Status
description: 'Filter by rule compliance status: ''COMPLIANT'' or ''NON_COMPLIANT''.'
- name: model_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter to a specific model.
title: Model Id
description: Filter to a specific model.
- name: policy_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter to a specific policy.
title: Policy Id
description: Filter to a specific policy.
- name: rule_type
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/ComplianceRuleType'
- type: 'null'
description: 'Filter by rule type: ''alert_rule'' or ''attestation_rule''.'
title: Rule Type
description: 'Filter by rule type: ''alert_rule'' or ''attestation_rule''.'
- name: rule_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter to rows for a specific rule.
title: Rule Id
description: Filter to rows for a specific rule.
- name: frequency
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: Filter attestation rules by validity period in days.
title: Frequency
description: Filter attestation rules by validity period in days.
- name: search
in: query
required: false
schema:
anyOf:
- type: string
maxLength: 200
- type: 'null'
description: Search across rule, model, and policy names (case-insensitive).
title: Search
description: Search across rule, model, and policy names (case-insensitive).
- name: sort
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 'Sort field: rule_name, rule_type, compliance_status, updated_at, created_at.'
title: Sort
description: 'Sort field: rule_name, rule_type, compliance_status, updated_at, created_at.'
- name: order
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/SortOrder'
- type: 'null'
description: 'Sort order: asc or desc.'
title: Order
description: 'Sort order: asc or desc.'
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
description: The page to return starting from 1 up to total_pages.
default: 1
title: Page
description: The page to return starting from 1 up to total_pages.
- name: page_size
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: The number of records per page. The max is 1000.
default: 20
title: Page Size
description: The number of records per page. The max is 1000.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ComplianceResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/organization/policies:
post:
tags:
- Policies V1
summary: Create Policy
description: Creates a new policy with inline rules for the organization. At least one alert or attestation rule is required. Requires organization_create_policy permission.
operationId: create_policy
security:
- OAuth2AuthorizationCode:
- organization_create_policy
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostPolicy'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySummary'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Policies V1
summary: List Policies
description: Lists all policies for the organization. Requires organization_list_policies permission.
operationId: list_policies
security:
- OAuth2AuthorizationCode:
- organization_list_policies
parameters:
- name: sort
in: query
required: false
schema:
$ref: '#/components/schemas/PolicySort'
description: Override the field used for sorting the returned list.
default: created_at
description: Override the field used for sorting the returned list.
- name: order
in: query
required: false
schema:
$ref: '#/components/schemas/SortOrder'
description: Override the sort order used.
default: desc
description: Override the sort order used.
- name: name
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter policies by name (case-insensitive partial match).
title: Name
description: Filter policies by name (case-insensitive partial match).
- name: owner_group_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter policies by owner group ID.
title: Owner Group Id
description: Filter policies by owner group ID.
- name: compliance_status
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/ComplianceStatus'
- type: 'null'
description: Filter by compliance status. Returns policies with at least one assignment matching this status.
title: Compliance Status
description: Filter by compliance status. Returns policies with at least one assignment matching this status.
- name: model_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter by assigned application/model ID.
title: Model Id
description: Filter by assigned application/model ID.
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
description: The page to return starting from 1 up to total_pages.
default: 1
title: Page
description: The page to return starting from 1 up to total_pages.
- name: page_size
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: The number of records per page. The max is 1000.
default: 20
title: Page Size
description: The number of records per page. The max is 1000.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceList_Policy_'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/policies/{policy_id}:
get:
tags:
- Policies V1
summary: Get Policy
description: Returns a single policy by ID including nested alert rules and attestation rules. Requires policy_read permission.
operationId: get_policy
security:
- OAuth2AuthorizationCode:
- policy_read
parameters:
- name: policy_id
in: path
required: true
schema:
type: string
format: uuid
title: Policy Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Policy'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
patch:
tags:
- Policies V1
summary: Update Policy
description: Updates a policy's metadata or enforcement delay. Requires policy_update permission.
operationId: update_policy
security:
- OAuth2AuthorizationCode:
- policy_update
parameters:
- name: policy_id
in: path
required: true
schema:
type: string
format: uuid
title: Policy Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatchPolicy'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Policy'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Policies V1
summary: Delete Policy
description: Deletes a policy and cascades to all assignments, materialized rules, and attestation records. Requires policy_delete permission.
operationId: delete_policy
security:
- OAuth2AuthorizationCode:
- policy_delete
parameters:
- name: policy_id
in: path
required: true
schema:
type: string
format: uuid
title: Policy Id
responses:
'204':
description: Successful Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/policies/{policy_id}/alert_rules:
post:
tags:
- Policies V1
summary: Create Policy Alert Rule
description: Creates a new alert rule for a policy. Propagates to all assigned applications. Requires policy_create_alert_rule permission.
operationId: create_policy_alert_rule
security:
- OAuth2AuthorizationCode:
- policy_create_alert_rule
parameters:
- name: policy_id
in: path
required: true
schema:
type: string
format: uuid
title: Policy Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostPolicyAlertRule'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyAlertRule'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
description: Internal Server Error
'404':
content:
application/json:
# --- truncated at 32 KB (138 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/arthurai/refs/heads/main/openapi/arthurai-policies-v1-api-openapi.yml