curl --request PATCH \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/set-current-version/VERSION_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents against compliance requirements",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174002",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-21T09:15:00Z"
}
Policies
Set Current Version
Set the current version of a policy
PATCH
/
policies
/
{policy_id}
/
set-current-version
/
{version_id}
/
curl --request PATCH \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/set-current-version/VERSION_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents against compliance requirements",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174002",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-21T09:15:00Z"
}
Change which version is the current (active) version for a policy. This is useful for rolling back to a previous version or promoting a specific version.
Agents that reference this policy will automatically use the new current version on their next job run.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
policy_id | uuid | Yes | UUID of the policy to update |
version_id | uuid | Yes | UUID of the version to set as current |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | uuid | Yes | UUID of the organization for access control |
curl --request PATCH \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/set-current-version/VERSION_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents against compliance requirements",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174002",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-21T09:15:00Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Organization ID. This is required for access control. It can be provided via query or request body depending on the endpoint.
Response
200 - application/json
Policy serializer