Rules
Methods
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
OptionalThe application ID. Required unless application_name is provided.
application_name:
string
OptionalThe application name. Required unless application_id is provided.
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 should be less than 100
rule_pattern:
string
The rule pattern regex. The length should be less than 64 KB
rule_pattern_exclude:
string
OptionalThe exclude pattern regex. The length should be less than 64 KB
scenario_id:
intlist
OptionalThe scenario ID list separated by semicolons (;). Required unless scenario_name is provided.
scenario_name:
stringlist
OptionalThe scenario name list separated by semicolons (;). Required unless scenario_id is provided.
video_conference:
boolean
OptionalDefaults on:Â Â falseWhether video conference is required
Returns
result:
number
Returns 1 if the request has been completed successfully
rule_id:
number
The new rule ID
Deletes the rule.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
intlist
OptionalThe application ID list separated by semicolons (;). Use the 'all' value to select all applications. Required unless application_name is provided.
application_name:
stringlist
OptionalThe application name list separated by semicolons (;). Required unless application_id is provided.
rule_id:
intlist
OptionalThe rule ID list separated by semicolons (;). Use the 'all' value to select all rules. Required unless rule_name is provided.
rule_name:
stringlist
OptionalThe rule name list separated by semicolons (;). Required unless rule_id is provided.
Returns
result:
number
Returns 1 if the request has been completed successfully
Gets the rules.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
number
OptionalThe application ID. Required unless application_name is provided.
application_name:
string
OptionalThe application name. Required unless application_id is provided.
attached_key_id:
string
OptionalThe service account ID bound to the rule. Read more in the guide
count:
number
OptionalDefaults on:Â Â 20The maximum 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
Configures the rules' order in the Applications section of Control panel. Note: the rules should 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
Returns 1 if the request has been completed successfully
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 should be less than 100
rule_pattern:
string
OptionalThe new rule pattern regex. The length should be less than 64 KB
rule_pattern_exclude:
string
OptionalThe new exclude pattern regex. The length should be less than 64 KB
video_conference:
boolean
OptionalWhether video conference is required
Returns
result:
number
Returns 1 if the request has been completed successfully