Rate this page:

Rules

Methods

AddRule

Copy URL

Adds a new rule for the application.

AddRule example

AddRule example

Add a new rule.

Parameters

  • application_id:

    number

    The application ID.

  • application_name:

    string

    The application name, can be used instead of application_id.

  • rule_name:

    string

    Optional

    The rule name. The length must be less than 100

  • rule_pattern:

    string

    Optional

    The rule pattern regex. The length must be less than 64 KB.

  • rule_pattern_exclude:

    string

    Optional

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

  • video_conference:

    boolean

    Optional
    Defaults on:  false

    Is video conference required?

  • scenario_id:

    intlist

    The scenario ID list separated by the ';' symbol.

  • scenario_name:

    stringlist

    Can be used instead of scenario_id. The scenario name list separated by the ';' symbol.

Returns

  • result:

    number

    1

  • rule_id:

    number

    The new rule ID.

DelRule

Copy URL

Deletes the rule.

DelRule example

DelRule example

Delete the rule 1 and 3.

Parameters

  • rule_id:

    intlist

    The rule ID list separated by the ';' symbol or the 'all' value.

  • rule_name:

    stringlist

    Can be used instead of rule_id. The rule name list separated by the ';' symbol.

  • application_id:

    intlist

    The application ID list separated by the ';' symbol or the 'all' value.

  • application_name:

    stringlist

    Can be used instead of application_id. The application name list separated by the ';' symbol.

Returns

  • result:

    number

    1

SetRuleInfo

Copy URL

Edits the rule.

SetRuleInfo example

SetRuleInfo example

Deny all.

Parameters

  • rule_id:

    number

    Optional

    The rule ID.

  • rule_name:

    string

    Optional

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

  • rule_pattern:

    string

    Optional

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

  • rule_pattern_exclude:

    string

    Optional

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

  • video_conference:

    boolean

    Optional

    Is video conference required?

Returns

  • result:

    number

    1

GetRules

Copy URL

Gets the rules.

GetRules example

GetRules example

Get the first rule for the template 74951234567

Parameters

  • application_id:

    number

    The application ID.

  • application_name:

    string

    The application name that can be used instead of application_id.

  • rule_id:

    number

    Optional

    The rule ID to filter

  • rule_name:

    string

    Optional

    The rule name part to filter.

  • video_conference:

    boolean

    Optional

    The video conference flag to filter.

  • template:

    string

    Optional

    Search for template matching

  • with_scenarios:

    boolean

    Optional

    Set true to get bound scenarios info.

  • count:

    number

    Optional
    Defaults on:  20

    The max returning record count.

  • offset:

    number

    Optional
    Defaults on:  0

    The first N records will be skipped in the output.

Returns

  • total_count:

    number

    The total found rule count.

  • count:

    number

    The returned rule count.

ReorderRules

Copy URL

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

ReorderRules example

ReorderRules example

Set the rule selection order: 1, 7, 3

Parameters

  • rule_id:

    intlist

    Optional

    The rule ID list separated by the ';' symbol.

Returns

  • result:

    number

    1