> Web scenario object

The following objects are directly related to the webcheck API.

Web scenario

The web scenario object has the following properties.

PropertyTypeDescription
httptestidstring(readonly) ID of the web scenario.
hostid
(required)
stringID of the host that the web scenario belongs to.
name
(required)
stringName of the web scenario.
agentstringUser agent string that will be used by the web scenario.

Default: Zabbix
applicationidstringID of the application that the web scenario belongs to.
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 and user macro.

Default: 1m.
headersarray of HTTP fieldsHTTP 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.
nextchecktimestamp(readonly) Time of the next web scenario execution.
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 are:
0 - (default) enabled;
1 - disabled.
templateidstring(readonly) ID of the parent template web scenario.
variablesarray of HTTP fieldsWeb scenario variables.
verify_hostintegerWhether to verify that the host name specified in the SSL certificate matches the one used in the scenario.

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

Possible values are:
0 - (default) skip peer verification;
1 - verify peer.

Scenario step

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

PropertyTypeDescription
httpstepidstring(readonly) ID of the scenario step.
name
(required)
stringName of the scenario step.
no
(required)
integerSequence number of the step in a web scenario.
url
(required)
stringURL to be checked.
follow_redirectsintegerWhether to follow HTTP redirects.

Possible values are:
0 - don’t follow redirects;
1 - (default) follow redirects.
headersarray of HTTP fieldsHTTP headers that will be sent when performing a request. Scenario step headers will overwrite headers specified for the web scenario.
httptestidstring(readonly) ID of the web scenario that the step belongs to.
postsstring
array of HTTP fields
HTTP 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 are:
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 and user macro.

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

HTTP field

The HTTP field object defines a name and value that is used to specify variable, HTTP header, POST form field data of query field data. It has the following properties.

PropertyTypeDescription
name
(required)
stringName of header / variable / POST or GET field.
value
(required)
stringValue of header / variable / POST or GET field.