v22

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

Get the draft for a policy

get/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'

Narrows which Cedar representation the response includes. When omitted, both cedar_json and cedar_raw are populated. Pass json to receive only cedar_json, or cedar to receive only cedar_raw. Callers that don't care about payload size can skip this parameter.

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.

Response

The 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