Guardrails
Preview

List guardrails

Every guardrail at its newest version with what it reaches (deployments, apps, clusters, after its exceptions), the exceptions in effect and, for a warn-only one, how many decisions it noted in the last 30 days: what the Guardrails board draws. `counts` are the tiles and `tabs` the counts on the Rul

GET
/guardrails
cookiebetter-auth.session_token<token>

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

q?string

Only guardrails whose name or description contains this text.

Lengthlength <= 100
mode?string

Only guardrails in this mode.

Value in"enforce""warn""off"
kind?string

Only rules, or only relaxing guardrails.

Value in"rule""relax"
ownerTeamId?string

Only this team's guardrails.

mine?boolean

Only the guardrails the caller's teams own.

withExceptions?boolean

Only guardrails with an exception in effect.

Response Body

The guardrails.

application/json
  1. response
items*array<>
counts*
tabs*

The counts on the Rules, Freezes and Exceptions tabs.

Example Request
curl -X GET 'https://wardn.example.com/api/v1/guardrails'
Example Response
{  "items": [    {      "guardrail": {        "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"      },      "mine": true,      "cover": {        "deployments": 0,        "apps": 0,        "clusters": 0,        "leftOut": 0,        "summary": "string",        "lowered": [          "string"        ]      },      "exceptionsInEffect": 0,      "notedLast30Days": 0    }  ],  "counts": {    "all": 0,    "mine": 0,    "enforced": 0,    "warn": 0,    "relaxes": 0,    "withExceptions": 0  },  "tabs": {    "rules": 0,    "activeFreezes": 0,    "exceptions": 0  }}