Policies

Retire an organisation invariant, naming the exact declaration it ends

POST
/v1/public/account/workspace/policy-platform/invariants/{invariantId}/retirements

Account session of the organisation's owner only; same-site JSON and an Idempotency-Key are required. invariantDigest must be the live declaration's digest (409 POLICY_INVARIANT_DIGEST_MISMATCH); a declaration is retired once (409 POLICY_INVARIANT_ALREADY_RETIRED). The declaration itself never changes; the retirement is recorded beside it, and the next assurance run no longer reads it.

Authorization

AccountSessionCookie
decionis_account_session<token>

The signed HttpOnly account session the web app holds after sign-in (also accepted as a Bearer acct_ token).

In: cookie

Path Parameters

invariantId*string

The declaration's id (record.id), not the invariant's name.

Formatuuid

Header Parameters

Idempotency-Key?string

Request Body

application/json

environment*string

Value in

  • "sandbox"
  • "production"
invariantDigest*string
Match^sha256:[a-f0-9]{64}$
reason*string
Length1 <= length <= 4000

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/public/account/workspace/policy-platform/invariants/497f6eca-6276-4993-bfeb-53cbbbba6f08/retirements" \  -H "Content-Type: application/json" \  -d '{    "environment": "sandbox",    "invariantDigest": "string",    "reason": "string"  }'
{  "record": {    "schemaVersion": 1,    "kind": "decionis.policy-invariant/v1",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",    "environment": "sandbox",    "invariant": {      "id": "string",      "statement": "string",      "decisionDomain": "string",      "decisionType": "string",      "input": {},      "vary": [        {          "field": "string",          "values": [            "string"          ]        }      ]    },    "declaredBy": "0a658536-d524-4ec3-a0d7-6a378ee32fd8",    "declaredAt": "2019-08-24T14:15:22Z",    "reason": "string"  },  "digest": "string",  "retirement": null}