Skip to main content
Parmana Policy API. Validate Runtime policies.

PolicyApi Objects

Policy API.

Responsibilities

  • Confirm a policy (name + version) is loadable by the Runtime
This API does NOT:
  • validate an arbitrary policy document’s contents. POST /policies/validate (packages/api/src/routes/policies.ts) only checks that policyRepository.load(policyId, policyVersion) succeeds — it does not accept or check a policy document body.
  • execute Business Transactions
  • verify trust records
  • replay executions
  • generate receipts

validate

Confirm that a policy (name + version) is loadable.

Parameters

policy_id: Policy identifier (policyId). policy_version: Policy version (policyVersion).

Returns

\{"valid": bool, "errors": list[str]\}. POST /policies/validate does not use the shared {error, code?} envelope for 400 or 404: both are {valid, errors}, the caller’s answer, not an SDK-level failure — so those two statuses are exempted from the default raise-on-error behavior. 401 is not exempted: it is generated by caller-auth middleware before this route’s own handler ever runs, and does use the shared envelope, identically to every other route.