Guardrails
Preview

Get a stored policy decision

A decision as it was made when a deploy was held or let through: every rule with its verdict and the facts it read, and the versions of the rules it used, even if the rules have changed since. Activity entries link to it by `decisionId`. A decision on a deployment the caller cannot read does not exi

GET
/policy-decisions/{decisionId}
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

decisionId*string
Formatuuid

Response Body

The decision.

application/json
  1. response
id*string
Formatuuid
deploymentId?string
Formatuuid
snapshotId?string
Formatuuid
action*string
actor*
outcome*string
Value in"allowed""needs""wait""blocked"
createdAt*string
Formatdate-time
rules*array<>
missing*array<string>
Example Request
curl -X GET 'https://wardn.example.com/api/v1/policy-decisions/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",  "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",  "action": "string",  "actor": {    "kind": "string",    "id": "string"  },  "outcome": "allowed",  "createdAt": "2019-08-24T14:15:22Z",  "rules": [    {      "ruleId": "string",      "version": 0,      "name": "string",      "source": "string",      "mode": "enforce",      "applies": true,      "skipped": "string",      "verdict": "met",      "requirements": [        {          "id": "string",          "label": "string",          "group": "string",          "verdict": "met",          "expected": "string",          "reason": "string",          "reads": [            {              "name": "string",              "value": "string",              "reason": "string"            }          ]        }      ]    }  ],  "missing": [    "string"  ]}