获取
此方法允许根据给出的参数检索Web场景。
此方法适用于任何类型的用户。可以在用户角色设置中撤销调用该方法的权限。更多信息请查看 User roles。
参数
此方法支持以下参数。
(integer/array)
返回以下其中一种结果:
- 一个对象数组;
- 如果使用了参数
countOutput
,则返回检索到的对象的数量。
示例
检索一个Web场景
请求:
响应:
{
"jsonrpc": "2.0",
"result": [
{
"httptestid": "9",
"name": "Homepage check",
"nextcheck": "0",
"delay": "1m",
"status": "0",
"variables": [],
"agent": "Zabbix",
"authentication": "0",
"http_user": "",
"http_password": "",
"templateid": "0",
"retries": "1",
"ssl_cert_file": "",
"ssl_key_file": "",
"ssl_key_password": "",
"verify_peer": "0",
"verify_host": "0",
"headers": [],
"steps": [
{
"httpstepid": "36",
"httptestid": "9",
"name": "Homepage",
"no": "1",
"url": "http://example.com",
"timeout": "15s",
"posts": "",
"required": "",
"status_codes": "200",
"variables": [
{
"name":"{var}",
"value":"12"
}
"follow_redirects": "1",
"headers": [],
"query_fields": []
},
{
"httpstepid": "37",
"httptestid": "9",
"name": "Homepage / About",
"no": "2",
"url": "http://example.com/about",
"timeout": "15s",
"posts": "",
"required": "",
"status_codes": "200",
"variables": [],
"follow_redirects": "1",
"retrieve_mode": "0",
"headers": [],
"query_fields": []
}
]
}
],
"id": 1