latestOpenAPI 3.1.02026-08-197104501.1 MB

8fbaab4fc7c5

Policies

Create Policy Version

Create a new draft version of a policy. Copies all fields from the source. Source is current production if source_policy_id is not provided.

post/policies/name/{policy_name}/versions

Path parameters

policy_namestring required

Request body

source_policy_idstring nullable

Policy ID to clone from. If None, clone from current production version.

Response

Successful Response

policy_idstring required

Unique ID of the policy.

policy_namestring required

Name of the policy.

version_numberinteger

Version number of this policy.

version_statusstring

One of: draft, published, production.

parent_version_idstring nullable

Policy ID this version was cloned from.

is_latestboolean

True if this is the latest version by version_number.

published_atstring date-time nullable

When this version was published.

production_atstring date-time nullable

When this version was promoted to production.

inheritstring nullable

Parent policy name.

descriptionstring nullable

Policy description.

guardrails_addstring[]

Guardrails to add.

guardrails_removestring[]

Guardrails to remove.

conditionobject nullable

Policy condition.

pipelineobject nullable

Optional guardrail pipeline.

created_atstring date-time nullable

When the policy was created.

updated_atstring date-time nullable

When the policy was last updated.

created_bystring nullable

Who created the policy.

updated_bystring nullable

Who last updated the policy.