Rules
Methods
AddRule
Adds a new rule for the application.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
number
The application ID
application_name:
string
The application name, can be used instead of application_id
bind_key_id:
string
OptionalThe service account ID to bind to the rule. Read more in the guide
rule_name:
string
The rule name. The length must be less than 100
rule_pattern:
string
The rule pattern regex. The length must be less than 64 KB
rule_pattern_exclude:
string
OptionalThe exclude pattern regex. The length must be less than 64 KB
scenario_id:
intlist
The scenario ID list separated by semicolons (;)
scenario_name:
stringlist
The scenario name list separated by semicolons (;). Can be used instead of scenario_id
video_conference:
boolean
OptionalDefaults on:Â Â falseWhether video conference is required
Returns
result:
number
1
rule_id:
number
The new rule ID
DelRule
Deletes the rule.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
intlist
The application ID list separated by semicolons (;). Use the 'all' value to select all applications
application_name:
stringlist
The application name list separated by semicolons (;). Can be used instead of application_id
rule_id:
intlist
The rule ID list separated by semicolons (;). Use the 'all' value to select all rules
rule_name:
stringlist
The rule name list separated by semicolons (;). Can be used instead of rule_id
Returns
result:
number
1
GetRules
Gets the rules.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
number
The application ID
application_name:
string
The application name that can be used instead of application_id
attached_key_id:
string
OptionalThe service account ID bound to the rule. Read more in the guide
count:
number
OptionalDefaults on:Â Â 20The max returning record count
offset:
number
OptionalDefaults on:Â Â 0The first N records are skipped in the output
rule_id:
number
OptionalThe rule ID to filter
rule_name:
string
OptionalThe rule name part to filter
template:
string
OptionalSearch for template matching
video_conference:
boolean
OptionalWhether it is a video conference to filter
with_scenarios:
boolean
OptionalWhether to get bound scenarios info
Returns
count:
number
The returned rule count
result:
total_count:
number
The total found rule count
ReorderRules
Configures the rules' order in the Applications section of Control panel. Note: the rules must belong to the same application!
To call this method, make sure your service account has one of the following roles:
Parameters
rule_id:
intlist
The rule ID list separated by semicolons (;)
Returns
result:
number
1
SetRuleInfo
Edits the rule.
To call this method, make sure your service account has one of the following roles:
Parameters
bind_key_id:
string
OptionalThe service account ID to bind to the rule. Read more in the guide
rule_id:
number
The rule ID
rule_name:
string
OptionalThe new rule name. The length must be less than 100
rule_pattern:
string
OptionalThe new rule pattern regex. The length must be less than 64 KB
rule_pattern_exclude:
string
OptionalThe new exclude pattern regex. The length must be less than 64 KB
video_conference:
boolean
OptionalWhether video conference is required
Returns
result:
number
1