Rate this page:

Rules

Methods

AddRule
Copy URL

Adds a new rule for the application.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
AddRule example

Parameters

  • application_id:

    number

    Optional

    The application ID. Required unless application_name is provided.

  • application_name:

    string

    Optional

    The application name. Required unless application_id is provided.

  • bind_key_id:

    string

    Optional

    The 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

    Optional

    The exclude pattern regex. The length should be less than 64 KB

  • scenario_id:

    intlist

    Optional

    The scenario ID list separated by semicolons (;). Required unless scenario_name is provided.

  • scenario_name:

    stringlist

    Optional

    The scenario name list separated by semicolons (;). Required unless scenario_id is provided.

  • video_conference:

    boolean

    Optional
    Defaults on:   false

    Whether video conference is required

Returns

  • result:

    number

    Returns 1 if the request has been completed successfully

  • rule_id:

    number

    The new rule ID

DelRule
Copy URL

Deletes the rule.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
DelRule example

Parameters

  • application_id:

    intlist

    Optional

    The application ID list separated by semicolons (;). Use the 'all' value to select all applications. Required unless application_name is provided.

  • application_name:

    stringlist

    Optional

    The application name list separated by semicolons (;). Required unless application_id is provided.

  • rule_id:

    intlist

    Optional

    The rule ID list separated by semicolons (;). Use the 'all' value to select all rules. Required unless rule_name is provided.

  • rule_name:

    stringlist

    Optional

    The rule name list separated by semicolons (;). Required unless rule_id is provided.

Returns

  • result:

    number

    Returns 1 if the request has been completed successfully

GetRules
Copy URL

Gets the rules.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
Supervisor
Call list manager
Support
GetRules example

Parameters

  • application_id:

    number

    Optional

    The application ID. Required unless application_name is provided.

  • application_name:

    string

    Optional

    The application name. Required unless application_id is provided.

  • attached_key_id:

    string

    Optional

    The service account ID bound to the rule. Read more in the guide

  • count:

    number

    Optional
    Defaults on:   20

    The maximum returning record count

  • offset:

    number

    Optional
    Defaults on:   0

    The first N records are skipped in the output

  • rule_id:

    number

    Optional

    The rule ID to filter

  • rule_name:

    string

    Optional

    The rule name part to filter

  • template:

    string

    Optional

    Search for template matching

  • video_conference:

    boolean

    Optional

    Whether it is a video conference to filter

  • with_scenarios:

    boolean

    Optional

    Whether to get bound scenarios info

Returns

  • count:

    number

    The returned rule count

  • total_count:

    number

    The total found rule count

ReorderRules
Copy URL

Configures the rules' order in the Applications section of Control panel. Note: the rules should belong to the same application!

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
ReorderRules example

Parameters

  • rule_id:

    intlist

    The rule ID list separated by semicolons (;)

Returns

  • result:

    number

    Returns 1 if the request has been completed successfully

SetRuleInfo
Copy URL

Edits the rule.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
SetRuleInfo example

Parameters

  • bind_key_id:

    string

    Optional

    The service account ID to bind to the rule. Read more in the guide

  • rule_id:

    number

    The rule ID

  • rule_name:

    string

    Optional

    The new rule name. The length should be less than 100

  • rule_pattern:

    string

    Optional

    The new rule pattern regex. The length should be less than 64 KB

  • rule_pattern_exclude:

    string

    Optional

    The new exclude pattern regex. The length should be less than 64 KB

  • video_conference:

    boolean

    Optional

    Whether video conference is required

Returns

  • result:

    number

    Returns 1 if the request has been completed successfully

Rate this page: