The removeScopeRoleAssignmentsForSharing mutation removes access to a specific resource (like a Dashboard) by revoking roles from users. This allows you to stop sharing Dashboards with individuals or groups.
Signature
removeScopeRoleAssignmentsForSharing (
scopeId : ID !
scopeRoleAssignments : [ ScopeRoleAssignmentInput ! ] !
scopeType : ScopeType !
): ResponseStatus !
Arguments
The unique identifier of the resource you want to remove sharing from (e.g., a Dashboard ID).
scopeRoleAssignments
[ScopeRoleAssignmentInput!]!
required
The type of resource being unshared. For Dashboards, this should be DASHBOARD.
Response
Returns a ResponseStatus object indicating the success or failure of the operation:
{
"code" : "OK" ,
"message" : "Role removed successfully"
}
Usage Example
The following example shows how to remove sharing access from a colleague:
mutation RemoveScopeRoleAssignments ( $scopeId : ID ! , $scopeRoleAssignments : [ ScopeRoleAssignmentInput ! ] ! , $scopeType : ScopeType ! ) {
removeScopeRoleAssignmentsForSharing (
scopeId : $scopeId
scopeRoleAssignments : $scopeRoleAssignments
scopeType : $scopeType
) {
code
message
}
}
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <jwt_token>" \
-d '{
"query": "mutation RemoveScopeRoleAssignments($scopeId: ID!, $scopeRoleAssignments: [ScopeRoleAssignmentInput!]!, $scopeType: ScopeType!) { removeScopeRoleAssignmentsForSharing(scopeId: $scopeId, scopeRoleAssignments: $scopeRoleAssignments, scopeType: $scopeType) { code message } }",
"variables": {
"scopeId": "story_123456789",
"scopeRoleAssignments": [
{
"roleId": "00000000-0000-0000-0000-000000000009",
"principalId": "user_987654321"
}
],
"scopeType": "DASHBOARD"
}
}' \
https://{ACCOUNT}.askwisdom.ai/graphql
{
"data" : {
"removeScopeRoleAssignmentsForSharing" : {
"code" : "OK" ,
"message" : "Role removed successfully"
}
}
}
Add Scope Role Assignments for Sharing Grant sharing access to users
Delete Dashboard Permanently delete a Dashboard
Dashboard Object Dashboard object schema and properties