controlPresets
Requires permission settings:controls:manage.
Lists the ready-made controls an admin can start from. Saving one creates an ordinary control. 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 ControlPresets {
controlPresets {
name
checkpoint
defaultMode
descriptionKey
join
presetId
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 ControlPresets {\n controlPresets {\n name\n checkpoint\n defaultMode\n descriptionKey\n join\n presetId\n conditions {\n number\n fact\n flag\n list\n op\n text\n }\n }\n}"
}
EOF
Response:
{
"data": {
"controlPresets": [
{
"name": "string",
"checkpoint": "string",
"defaultMode": "string",
"descriptionKey": "string",
"join": "string",
"presetId": "string",
"conditions": [
{
"number": 0,
"fact": "string",
"flag": true,
"list": [
"string"
],
"op": "string",
"text": "string"
}
]
}
]
}
}
controlPresets: [ControlPresetType!]!
Type
ControlPresetType object
A ready-made control to start from.