setCopilotSessionApprovalRule
Requires permission catalog:copilot:chat.
Turn "don't ask again for low-tier cards in this chat" on or off for one of the CALLER'S sessions. Never applies at medium or above.
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
mutation SetCopilotSessionApprovalRule($enabled: Boolean!, $sessionId: ID!) {
setCopilotSessionApprovalRule(enabled: $enabled, sessionId: $sessionId) {
autoApproveAvailable
autoApproveLow
sessionLowTier
textApprovalAvailable
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SetCopilotSessionApprovalRule($enabled: Boolean!, $sessionId: ID!) {\n setCopilotSessionApprovalRule(enabled: $enabled, sessionId: $sessionId) {\n autoApproveAvailable\n autoApproveLow\n sessionLowTier\n textApprovalAvailable\n }\n}",
"variables": {
"enabled": true,
"sessionId": "id"
}
}
EOF
Variables:
{
"enabled": true,
"sessionId": "id"
}
Response:
{
"data": {
"setCopilotSessionApprovalRule": {
"autoApproveAvailable": true,
"autoApproveLow": true,
"sessionLowTier": true,
"textApprovalAvailable": true
}
}
}
setCopilotSessionApprovalRule(
enabled: Boolean!
sessionId: ID!
): CopilotApprovalRulesType!
Arguments
setCopilotSessionApprovalRule.enabled ● Boolean! non-null scalar
True to apply the approval rule to this session.
setCopilotSessionApprovalRule.sessionId ● ID! non-null scalar
The ID of the Copilot session.
Type
CopilotApprovalRulesType object
The caller's standing approval rules, for low-risk proposals only. The available flags say whether the organization has switched the feature on.