controls
Requires permission settings:controls:manage.
Lists the organization's controls with their decisions over the last 30 days. A control whose stored rule no longer validates is listed with invalid set. Requires settings:controls:manage.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query Controls($includeArchived: Boolean!) {
controls(includeArchived: $includeArchived) {
id
name
archived
checkpoint
invalid
invalidReason
conditions {
number
fact
flag
list
op
text
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query Controls($includeArchived: Boolean!) {\n controls(includeArchived: $includeArchived) {\n id\n name\n archived\n checkpoint\n invalid\n invalidReason\n conditions {\n number\n fact\n flag\n list\n op\n text\n }\n }\n}",
"variables": {
"includeArchived": true
}
}
EOF
Variables:
{
"includeArchived": true
}
Response:
{
"data": {
"controls": [
{
"id": "id",
"name": "string",
"archived": true,
"checkpoint": "string",
"invalid": true,
"invalidReason": "string",
"conditions": [
{
"number": 0,
"fact": "string",
"flag": true,
"list": [
"string"
],
"op": "string",
"text": "string"
}
]
}
]
}
}
controls(
includeArchived: Boolean! = false
): [ControlRuleType!]!
Arguments
controls.includeArchived ● Boolean! non-null scalar
Include archived controls.
Type
ControlRuleType object
A control: one rule checked at one checkpoint, with its mode and recent decisions.