v22

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-01140308542.4 KB
PolicyDrafts

Create or update a policy draft

put/zones/{zone_id}/policies/{policy_id}/draft

Path parameters

zone_idstring required

The zone identifier

policy_idstring required

The policy identifier

Query parameters

format'cedar' | 'json'

Response format override. json returns cedar_json, cedar returns cedar_raw. When omitted, the response matches the input format.

validate_cedarboolean

Whether to validate cedar_json against the schema. Defaults to true.

Headers

X-API-Versionstring

API version header (date-based, e.g. 2026-02-01)

X-Client-Request-IDstring uuid

Unique request identifier specified by the originating caller and passed along by proxies.

Request body

cedar_jsonobject nullable

Cedar policy in JSON representation. Mutually exclusive with cedar_raw.

cedar_rawstring nullable

Cedar policy in human-readable Cedar syntax. Mutually exclusive with cedar_json.

schema_versionstring required

Response

The upserted policy draft

policy_idstring required
cedar_jsonobject nullable

Cedar policy in JSON representation. Populated by default and when format=json is passed; null when format=cedar narrows the response to the text representation only.

cedar_rawstring nullable

Cedar policy in human-readable syntax. Populated by default and when format=cedar is passed; null when format=json narrows the response to the JSON representation only.

schema_versionstring required
base_version_idstring nullable

ID of the policy version this draft was hydrated from. Null when the draft was created without an existing version.

created_atstring date-time required
updated_atstring date-time required
updated_bystring required