> Web scenario object

The following objects are directly related to the webcheck API.

Web scenario

The web scenario object has the following properties.

PropertyTypeDescription
httptestidstringID of the web scenario.

Property behavior:
- read-only
- required for update operations
hostidstringID of the host that the web scenario belongs to.

Property behavior:
- constant
- required for create operations
namestringName of the web scenario.

Property behavior:
- required for create operations
agentstringUser agent string that will be used by the web scenario.

Default: Zabbix
authenticationintegerAuthentication method that will be used by the web scenario.

Possible values:
0 - (default) none;
1 - basic HTTP authentication;
2 - NTLM authentication.
delaystringExecution interval of the web scenario.
Accepts seconds, time unit with suffix, or a user macro.

Default: 1m.
headersarrayHTTP headers that will be sent when performing a request.
http_passwordstringPassword used for basic HTTP or NTLM authentication.
http_proxystringProxy that will be used by the web scenario given as http://[username[:password]@]proxy.example.com[:port].
http_userstringUser name used for basic HTTP or NTLM authentication.
retriesintegerNumber of times a web scenario will try to execute each step before failing.

Default: 1.
ssl_cert_filestringName of the SSL certificate file used for client authentication (must be in PEM format).
ssl_key_filestringName of the SSL private key file used for client authentication (must be in PEM format).
ssl_key_passwordstringSSL private key password.
statusintegerWhether the web scenario is enabled.

Possible values:
0 - (default) enabled;
1 - disabled.
templateidstringID of the parent template web scenario.

Property behavior:
- read-only
variablesarrayWeb scenario variables.
verify_hostintegerWhether to verify that the host name specified in the SSL certificate matches the one used in the scenario.

Possible values:
0 - (default) skip host verification;
1 - verify host.
verify_peerintegerWhether to verify the SSL certificate of the web server.

Possible values:
0 - (default) skip peer verification;
1 - verify peer.
uuidstringGlobal unique identifier, used for linking imported web scenarios to already existing ones. Auto-generated, if not given.

Property behavior:
- supported if the web scenario belongs to a template

Web scenario tag

The web scenario tag object has the following properties.

PropertyTypeDescription
tagstringWeb scenario tag name.

Property behavior:
- required
valuestringWeb scenario tag value.

Scenario step

The scenario step object defines a specific web scenario check. It has the following properties.

PropertyTypeDescription
namestringName of the scenario step.

Property behavior:
- required
nointegerSequence number of the step in a web scenario.

Property behavior:
- required
urlstringURL to be checked.

Property behavior:
- required
follow_redirectsintegerWhether to follow HTTP redirects.

Possible values:
0 - don’t follow redirects;
1 - (default) follow redirects.
headersarrayHTTP headers that will be sent when performing a request. Scenario step headers will overwrite headers specified for the web scenario.
postsstring/arrayHTTP POST variables as a string (raw post data) or as an array of HTTP fields (form field data).
requiredstringText that must be present in the response.
retrieve_modeintegerPart of the HTTP response that the scenario step must retrieve.

Possible values:
0 - (default) only body;
1 - only headers;
2 - headers and body.
status_codesstringRanges of required HTTP status codes, separated by commas.
timeoutstringRequest timeout in seconds. Accepts seconds, time unit with suffix, or a user macro.

Default: 15s. Maximum: 1h. Minimum: 1s.
variablesarrayScenario step variables.
query_fieldsarrayQuery fields - array of HTTP fields that will be added to URL when performing a request.

HTTP field

The HTTP field object defines the name and value that is used to specify the web scenario variables, HTTP headers, and POST fields or query fields. It has the following properties.

PropertyTypeDescription
namestringName of header/variable/POST or GET field.

Property behavior:
- required
valuestringValue of header/variable/POST or GET field.

Property behavior:
- required