Read a Policy version
GET /v1/policies/{policy_id}/versions/{version}
Property Value Operation get_policy_versionGroup Policies Scope policies:readRoute class readIdempotency No Idempotency-Key Audit Not audited: A configuration read; a Policy is not Call content. Released in 1.47.0 Phase 0 host Served (the hosted api pins 1.65.0)
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the policies:read scope (Authentication and keys ). Replace each placeholder, such as agt_... or <name>, with your own value.
cURL Node.js Python
curl "$VOCAL_API/v1/policies/pol_.../versions/1" \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/policies/pol_.../versions/1`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/policies/pol_.../versions/1",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)
Parameters
Name In Type Required Description policy_idpath PolicyId yes The id of a Policy: pol_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. versionpath integer yes A version number, from 1.
Responses
Fields of the 200 answer
The shape is PolicyVersion .
Field Type Required Description action_typePolicyActionType yes activeboolean yes True for the active version: the one Agent version publish pins, or, for an organization-scoped Policy, the one dispatch resolves. analysisPolicyAnalysis yes compliance_tagComplianceTag or nullyes engine_versionstring yes The Zen engine version the version was published under; a worker refuses one it does not run with rules_engine_version_mismatch. hookHookPoint yes logicJdmDocument yes logic_sha256string yes The SHA-256 of the canonical document, in lowercase hex. notesstring or null yes object"policy_version"yes policy_idPolicyId yes priorityinteger yes profile_versioninteger yes The Vocal JDM profile version the document was linted under. published_atTimestamp yes published_byActorRef yes source_revisioninteger yes The draft revision this version was published from. statusPolicyVersionStatus yes versioninteger yes The snapshot number, from 1.