Policy lifecycle
- Create a draft with
POST /v1/organization/policies. - Edit selected draft fields with
PATCH /v1/organization/policies/{policy_id}. - Publish the draft with
POST /v1/organization/policies/{policy_id}/publish. - Pause or resume the published version without creating another version.
revision. Send the latest revision with an
update or lifecycle action. If another caller changes the policy first, the API
returns 409 policy_revision_conflict instead of overwriting that change.
Create a draft
Policy rules are yes-or-no questions ending in a question mark.direction is request, response, or both. mode is monitoring or
enforcing. scope is one of:
match_threshold_basis_points is optional. For example, 9000 means 90
percent. Omit it to use the platform default.
Edit the draft
PATCH changes only the fields you include. It does not change the published
version. Set match_threshold_basis_points to null to return to the platform
default.
scope: "projects", include at least one project ID.
Changing it to organization or unattached clears its project selection.
Publish the draft
Publishing creates the next immutable version and makes it the current published version.Pause or resume a policy
Pausing stops the policy from applying automatically. Resuming restores the same published version and mode./resume path and the latest revision to resume it.
Pausing a draft or resuming an active policy returns
409 policy_state_conflict.
Read versions and effective policies
unattached
policies. See Policies in API requests to select an
unattached policy for one inference request.