controlSetupCheck
Requires permission settings:controls:manage.
Checks a control without saving it: the rule against the fact catalogue, its warehouse and customer references, and whether anyone other than you could approve it. 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 ControlSetupCheck($input: SaveControlInput!) {
controlSetupCheck(input: $input) {
approverCount
notes
ok
errors {
code
messageKey
path
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query ControlSetupCheck($input: SaveControlInput!) {\n controlSetupCheck(input: $input) {\n approverCount\n notes\n ok\n errors {\n code\n messageKey\n path\n }\n }\n}",
"variables": {
"input": {
"checkpoint": "string",
"conditions": [
{
"fact": "string",
"op": "string",
"value": {}
}
],
"join": "string",
"name": "string",
"outcome": {
"kind": "string"
}
}
}
}
EOF
Variables:
{
"input": {
"checkpoint": "string",
"conditions": [
{
"fact": "string",
"op": "string",
"value": {}
}
],
"join": "string",
"name": "string",
"outcome": {
"kind": "string"
}
}
}
Response:
{
"data": {
"controlSetupCheck": {
"approverCount": 0,
"notes": [
"string"
],
"ok": true,
"errors": [
{
"code": "string",
"messageKey": "string",
"path": "string"
}
]
}
}
}
controlSetupCheck(
input: SaveControlInput!
): ControlSetupCheckType!
Arguments
controlSetupCheck.input ● SaveControlInput! non-null input
The control to check.
Type
ControlSetupCheckType object
The result of checking a control before it is saved or enabled.