Guardrails
Preview

Get a guardrail

The guardrail at its newest version, or at `version` for the history and for a stored decision that used it.

GET
/guardrails/{guardrailId}
cookiebetter-auth.session_token<token>

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

guardrailId*string
Formatuuid
version?integer

A saved version; the newest when omitted.

Range1 <= value

Response Body

The guardrail.

application/json
  1. response
actions*array<>

The actions it governs. A guardrail saved before it named any reads as release and rollback, which is what it has always governed.

id*string
Formatuuid
name*string
description*string
kind*string
Value in"rule""relax"
mode*string
Value in"enforce""warn""off"
builtin*boolean
fromPreset?string

The preset it was made from, when it was.

builtinKey?string

Set on the guardrails Wardn ships, such as protected_branch and freezes.

ownerTeamId?string

The team that owns it and alone may add exceptions; absent for the organization and for a caller who may not read the team.

ownerTeamName?string

The owning team's name, shown to anyone who reads the guardrail.

cover?
exceptionsInEffect?integer

Exceptions in effect on places the caller may see. Present on a single guardrail read, with cover.

scope*array<>
requires*array<>
version*
newestVersion*integer
archived*boolean
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X GET 'https://wardn.example.com/api/v1/guardrails/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "actions": [    "release"  ],  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "description": "string",  "kind": "rule",  "mode": "enforce",  "builtin": true,  "fromPreset": "string",  "builtinKey": "string",  "ownerTeamId": "string",  "ownerTeamName": "string",  "cover": {    "deployments": 0,    "apps": 0,    "clusters": 0,    "leftOut": 0,    "summary": "string",    "lowered": [      "string"    ]  },  "exceptionsInEffect": 0,  "scope": [    {      "field": "class",      "op": "is",      "value": "string",      "label": "string"    }  ],  "requires": [    {      "id": "string",      "kind": "approval",      "count": 1,      "humanOnly": true,      "group": "security",      "level": "propose",      "when": "freeze",      "branch": "string",      "system": "servicenow",      "afterSeconds": 60,      "days": 1,      "label": "string"    }  ],  "version": {    "version": 1,    "summary": "string",    "mode": "enforce",    "createdBy": {      "id": "string",      "name": "string"    },    "createdAt": "2019-08-24T14:15:22Z"  },  "newestVersion": 0,  "archived": true,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}