This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

webcheck.get

Description

integer/array webcheck.get(object parameters)

The method allows to retrieve web scenarios according to the given parameters.

Parameters

(object) Parameters defining the desired output.

The method supports the following parameters.

Parameter Type Description
applicationids string/array Return only web scenarios that belong to the given applications.
hostids string/array Return only web scenarios that belong to the given hosts.
httptestids string/array Return only web scenarios with the given IDs.
selectHosts query Return the host that the web scenario belongs to as an array in the hosts property.

Does not support shorten or arrays of properties.
selectSteps query Return an object containing the web scenario steps in the steps property.

Does not support shorten or arrays of properties.
sortfield string/array Sort the result by the given properties.

Possible values are: httptestid and name.
countOutput flag These parameters being common for all get methods are described in detail on the Generic Zabbix API information page.
editable boolean
excludeSearch flag
filter object
limit integer
nodeids string/array
output query
preservekeys flag
search object
searchByAny boolean
searchWildcardsEnabled boolean
sortorder string/array
startSearch flag

Return values

(integer/array) Returns either:

  • an array of objects;
  • the count of retrieved objects, if the countOutput parameter has been used.

Examples

Retrieving a web scenario

Retrieve all data about web scenario "5".

Request:

{
           "jsonrpc": "2.0",
           "method": "webcheck.get",
           "params": {
               "output": "extend",
               "selectSteps": "extend",
               "httptestids": "5"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": [
               {
                   "steps": [
                       {
                           "httptestid": "5",
                           "name": "Homepage",
                           "no": "1",
                           "url": "http://mycompany.com",
                           "timeout": "30",
                           "posts": "",
                           "required": "",
                           "status_codes": "200",
                           "webstepid": "5"
                       },
                       {
                           "httptestid": "5",
                           "name": "Homepage / About",
                           "no": "2",
                           "url": "http://mycompany.com/about",
                           "timeout": "30",
                           "posts": "",
                           "required": "",
                           "status_codes": "200",
                           "webstepid": "6"
                       }
                   ],
                   "httptestid": "5",
                   "name": "Homepage check",
                   "applicationid": "654",
                   "nextcheck": "0",
                   "delay": "60",
                   "status": "0",
                   "macros": "",
                   "agent": "",
                   "authentication": "0",
                   "http_user": "",
                   "http_password": ""
               }
           ],
           "id": 1
       }

See also

Source

CWebCheck::get() in frontends/php/api/classes/CWebCheck.php.