Rules Queries & Mutations
Creating Client Rule Set
The clientRuleSetCreate
mutation allows you to create a new client rule set with specified criteria and settings. This mutation accepts an input variable of type CreateClientRuleSetInput
, which contains all the necessary information to create the rule set.
🚧
Note!!!
Replace the placeholders like
"name"
,"description"
,"policyId"
,"states"
, etc., with actual values as per your requirements in the input variable.
GraphQLJSONSample Response
mutation clientRuleSetCreate($input: CreateClientRuleSetInput!) {
clientRuleSetCreate(input: $input){
id
name
description
status
policies {id}
approve {
id
}
manualReview {
id
}
}
}
Upon successful execution of the mutation, you will receive a response with the newly created client rule set information
To Update Client Rule Set
The clientRuleSetUpdate
mutation allows you to update a client rule set with the specified input parameters. You can modify the rule set's name, description, policies, approval criteria, manual review criteria, and remove specific rules from the rule set.
GraphQLJSONSample Response
mutation clientRuleSetUpdate($input: UpdateClientRuleSetInput!) {
clientRuleSetUpdate(input: $input){
id
name
description
status
policies {id}
approve {
id
}
manualReview {
id
}
}
}
In the sample response above, the rule set with the identifier ruleSetId
has been successfully updated with the provided input data. The name, description, policies, approval criteria, and manual review criteria have been modified accordingly. The status of the rule set is now set to "ACTIVE"
.
To Delete Client Rule Set
The clientRuleSetDelete
mutation allows you to delete a client rule set using the provided id
.
GraphQLJSONSample Response
mutation clientRuleSetDelete($input: MutateClientRuleSetInput!) {
clientRuleSetDelete(input: $input){
id
name
description
status
policies {id}
approve {
id
}
manualReview {
id
}
}
}
To Disable Client Rule Set
The clientRuleSetDisable
mutation is used to disable a client rule set in the system. Disabling a client rule set means that the rules and policies associated with it will not be enforced for the specified client. This mutation takes an input variable of type MutateClientRuleSetInput
, which contains the necessary information to disable the rule set.
GraphQLJSONSample Response
clientRuleSetEnable
The clientRuleSetEnable
mutation enables a specific client rule set identified by its id
{
"input": {
"id": "CLIENT_RULE_SET_ID"
}
}. This mutation allows you to activate a client rule set, which in turn may trigger various policies and actions associated with it. Please note that the client rule set should already exist in the system, and only an authorized user with the necessary permissions can execute this mutation.
GraphQLJSONSample Response
In the sample response, approve
and manualReview
fields are included to show possible data structures, but they may be optional or null based on your specific application's implementation.
ruleBreakDown
The ruleBreakDown
query allows you to retrieve a breakdown of the rule evaluation for a specific application based on the provided input parameters. It returns information about the associated policy and rule set, as well as whether the application passed each rule and whether it requires manual review.
GraphQLJSONSample Response