In addition to the configuration in the UI (Visual mode), you can use Script mode to configure your HTTP monitors. In this mode, you can access the underlying JSON script of your monitor. If you're a Synthetic Monitoring power user, this will make your life a lot easier and allow you to speed up monitor creation and management. Use the script editor to quickly find specific events (steps) or adapt locators across the entire script.
You aren't limited to just one mode—you can switch between the UI and script modes by selecting the Visual mode/Script mode.
To edit your HTTP monitor in script mode:
You can download the script (Download script as .json) or just copy it from the editor and edit it in a text editor of your choice. However, you can also edit the script directly in the browser. This provides the following benefits:
Note that you need to escape all special characters and break lines with a backslash (for example, a new line is \n, double quotes is \", and tab is \t).
Contains the monitor script.
request object Contains the parameters of an HTTP request.
requestValidation object Contains the validation configuration for the request.
The following types of rules (see validationRule) are evaluated for HTTP monitor validation:
This means that the monitor will fail if at least one of these rules with passIfFound = false is met or at least one rule with passIfFound = true is not met.
The monitor will succeed if all rules with passIfFound = false are not met and all rules with passIfFound = true are met.
validationRule object Contains a validation rule.
requestConfiguration object Contains the setup of the monitor.
requestHeader object Contains an HTTP header of the request.
Synthetic Classic