Policies

The policy in force is what every verdict is judged against. Its id is the pin an intent carries, and reading it is the first step of the submit loop and the recovery step after a 409.

GET/api/v1/policies/active

Read the policy in force

Answers the id of the policy in force, or null if none is.

null is always emitted explicitly, never omitted — and it is not an error. "No policy is in force" is a true fact about a ledger, and a client that treats a missing key and a null value differently will read it wrong. Submitting an intent while no policy is in force is a 409 no_active_policy.

Response

  • Name
    policy
    Type
    string | null
    Description

    The id of the policy in force (pol_…), or null.

This is the endpoint to re-read after a 409 (stale_policy or policy_pin_mismatch) before resubmitting. Its value is what the envelope's policy pin must carry. The SDKs' submit_pinned calls it for you.

Read the policy in force

GET
/api/v1/policies/active
use axorum_client::AxorumClient;

let client = AxorumClient::builder("http://127.0.0.1:8080").build()?;

// `None` is not an error — no policy is in force.
let policy = client.active_policy().await?;

Response

{
  "policy": "pol_2s5479gmf7bhrsavd5awacb0fg"
}

Response — none in force

{
  "policy": null
}

Was this page accurate?