Zabbix Documentation 5.2

3.04.05.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.24.4Guidelines

User Tools

Site Tools


manual:api:reference:httptest:create

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
manual:api:reference:httptest:create [2014/09/25 14:43]
sasha Page moved from 2.4:manual:api:reference:httptest:create to manual:api:reference:httptest:create
manual:api:reference:httptest:create [2020/08/06 12:05] (current)
martins-v internal link to data type commentary (ZBX-17160)
Line 7: Line 7:
 This method allows to create new web scenarios. This method allows to create new web scenarios.
  
-<​note>​Creating a web scenario will automatically create a set of [[2.4:manual:​web_monitoring:​items|web monitoring items]].</​note>​+<​note>​Creating a web scenario will automatically create a set of [[manual:​web_monitoring:​items|web monitoring items]].</​note>​
  
 ==== Parameters ==== ==== Parameters ====
Line 13: Line 13:
 ''​(object/​array)''​ Web scenarios to create. ''​(object/​array)''​ Web scenarios to create.
  
-Additionally to the [[2.4:​manual:​api:​reference:​httptest:​object#​web_scenario|standard web scenario properties]],​ the method accepts the following parameters.+Additionally to the [[object#​web_scenario|standard web scenario properties]],​ the method accepts the following parameters.
  
-^ Parameter ^ Type ^ Description ^ +^ Parameter ^ [[:​manual/​api/​reference_commentary#​data_types|Type]] ^ Description ^ 
-| **steps** \\ (required) | array | Web scenario steps. | +| **steps** \\ (required) | array | Web scenario ​[[:​manual/​api/​reference/​httptest/​object#​scenario_step|steps]]. |
- +
-<note tip>The ''​hostid''​ parameter can be omitted if the ''​applicationid''​ parameter is given. In that case, the web scenario will be assigned to the host that the application belongs to.</​note>​+
  
 ==== Return values ==== ==== Return values ====
Line 31: Line 29:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 42: Line 40:
                 "​name":​ "​Homepage",​                 "​name":​ "​Homepage",​
                 "​url":​ "​http://​mycompany.com",​                 "​url":​ "​http://​mycompany.com",​
-                "​status_codes":​ 200,+                "​status_codes": ​"200",
                 "​no":​ 1                 "​no":​ 1
             },             },
Line 48: Line 46:
                 "​name":​ "​Homepage / About",​                 "​name":​ "​Homepage / About",​
                 "​url":​ "​http://​mycompany.com/​about",​                 "​url":​ "​http://​mycompany.com/​about",​
-                "​status_codes":​ 200,+                "​status_codes": ​"200",
                 "​no":​ 2                 "​no":​ 2
             }             }
Line 59: Line 57:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 73: Line 71:
 ==== See also ==== ==== See also ====
  
-  * [[2.4:​manual:​api:​reference:​httptest:​object#​scenario_step|Scenario step]]+  * [[object#​scenario_step|Scenario step]]
  
 ==== Source ==== ==== Source ====
  
-CHttpTest::​create() in //frontends/php/api/classes/​CHttpTest.php//​.+CHttpTest::​create() in //ui/include/​classes/api/services/​CHttpTest.php//​.