Read a Policy draft
GET /v1/policies/{policy_id}
Property Value Operation get_policyGroup 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_..." \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/policies/pol_...`, {
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_...",
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.
Responses
Fields of the 200 answer
The shape is Policy .
Field Type Required Description action_typePolicyActionType yes The one action type the document may output; its legality at hook is checked at save. active_versioninteger or null yes The version Agent version publish pins (agent scope) or dispatch resolves (organization scope), or null when none is active. analysisPolicyAnalysis yes archived_atTimestamp or nullyes When DELETE archived the Policy, or null. An archived Policy takes no write, publish or activation (409 policy_archived); its pinned versions keep running. compliance_tagComplianceTag or nullyes created_atTimestamp yes descriptionstring or null yes For reviewers; never sent to the model. enabledboolean yes The kill switch, read at dispatch and effective from the next Call; not part of any version. hookHookPoint yes idPolicyId yes latest_versioninteger or null yes The highest published version, or null before the first publish. logicJdmDocument yes namePolicyName yes object"policy"yes organization_idOrganizationId yes originPolicyOrigin yes priorityinteger yes Lower runs first; ties go to organization scope, then to the id. revisioninteger yes Counts writes to the draft; returned as the ETag and required in If-Match. scopePolicyScope yes setting_pathSettingPath or nullyes For a derived Policy, the setting it was compiled from; null when authored. updated_atTimestamp yes