VocalDocscontracts 1.65.0

Read a Policy draft

GET /v1/policies/{policy_id}

PropertyValue
Operationget_policy
GroupPolicies
Scopepolicies:read
Route classread
IdempotencyNo Idempotency-Key
AuditNot audited: A configuration read; a Policy is not Call content.
Released in1.47.0
Phase 0 hostServed (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 "$VOCAL_API/v1/policies/pol_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY"

Parameters

NameInTypeRequiredDescription
policy_idpathPolicyIdyesThe id of a Policy: pol_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.

Responses

StatusContent typeShapeError codes
200application/jsonPolicy
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is Policy.

FieldTypeRequiredDescription
action_typePolicyActionTypeyesThe one action type the document may output; its legality at hook is checked at save.
active_versioninteger or nullyesThe version Agent version publish pins (agent scope) or dispatch resolves (organization scope), or null when none is active.
analysisPolicyAnalysisyes
archived_atTimestamp or nullyesWhen 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_atTimestampyes
descriptionstring or nullyesFor reviewers; never sent to the model.
enabledbooleanyesThe kill switch, read at dispatch and effective from the next Call; not part of any version.
hookHookPointyes
idPolicyIdyes
latest_versioninteger or nullyesThe highest published version, or null before the first publish.
logicJdmDocumentyes
namePolicyNameyes
object"policy"yes
organization_idOrganizationIdyes
originPolicyOriginyes
priorityintegeryesLower runs first; ties go to organization scope, then to the id.
revisionintegeryesCounts writes to the draft; returned as the ETag and required in If-Match.
scopePolicyScopeyes
setting_pathSettingPath or nullyesFor a derived Policy, the setting it was compiled from; null when authored.
updated_atTimestampyes