Parameter validation
A pulse accepts two types of parameters.
- integer
- string
You can post parameters in these forms to validate with rules. Rules are set when setting up a pulse and could include one of a combination of the following relation expressions.
==
for equal to!=
for not equal to<
for less than<=
for less than or equal to>
for greater than>=
for greater than or equal to
Set parameter validation for a pulse
You can set your pulse to receive parameters while setting it up or edit an existing pulse.
On Add Pulse or Edit Pulse screen, click on Click to add rule. When you click, you see a preset rule line that you can configure as you like. The inputs for a rule are
- Name
- Type
- Relation expression
- Value
It is possible to determine an interval for a parameter. You should add two rules with the same name, asserting an interval.
It is also possible to validate multiple parameters within a single requests. You should add multiple rules as neccessary for multiple parameters to be validated.
Multiple rules form a logical expression as (rule_1)&&(rule_2)&&(rule_3).
Examples
Example HTTP request 1:
https://pulse.webgazer.io/2-0e6217056425?success=true&time=12
Example HTTP request 2:
https://pulse.webgazer.io/2-0e6217056425?success=true&time=27
For this pulse, assume you have two rules.
- success == true
- time <= 20
Then, validation results in success for Example 1. For Example 2, validation fails and an incident is registered for your pulse.