en-us	#### Retrieve audit log  Retrieve two latest audit log records.  Request:  ```json {     "jsonrpc": "2.0",     "method": "auditlog.get",     "params": {         "output": "extend",         "sortfield": "clock",         "sortorder": "DESC",         "limit": 2     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "auditid": "cksstgfam0001yhdcc41y20q2",             "userid": "1",             "username": "Admin",             "clock": "1629975715",             "ip": "127.0.0.1",             "action": "1",             "resourcetype": "0",             "resourceid": "0",             "resourcename": "Jim",             "recordsetid": "cksstgfal0000yhdcso67ondl",             "details": "{\"user.name\":[\"update\",\"Jim\",\"\"],\"user.medias[37]\":[\"add\"],\"user.medias[37].\":[\"add\"],\"user.medias[37].mediatypeid\":[\"add\",\"1\"],\"user.medias[37].sendto\":[\"add\",\"support123@company.com\"]}"                      },         {             "auditid": "ckssofl0p0001yhdcqxclsg8r",             "userid": "1",             "username": "Admin",             "clock": "1629967278",             "ip": "127.0.0.1",             "action": "0",             "resourcetype": "0",             "resourceid": "20",             "resourcename": "John",             "recordsetid": "ckssofl0p0000yhdcpxyo1jgo",             "details": "{\"user.username\":[\"add\",\"John\"], \"user.userid:\":[\"add\",\"20\"],\"user.usrgrps[28]\":[\"add\"],\"user.usrgrps[28].usrgrpid\":[\"add\", \"7\"]}"         }     ],     "id": 1 } ```
zh-cn	#### 检索审计日志   检索两个最新的审计日志记录。  请求：  ```json {     "jsonrpc": "2.0",     "method": "auditlog.get",     "params": {         "output": "extend",         "sortfield": "clock",         "sortorder": "DESC",         "limit": 2     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "auditid": "cksstgfam0001yhdcc41y20q2",             "userid": "1",             "username": "Admin",             "clock": "1629975715",             "ip": "127.0.0.1",             "action": "1",             "resourcetype": "0",             "resourceid": "0",             "resourcename": "Jim",             "recordsetid": "cksstgfal0000yhdcso67ondl",             "details": "{\"user.name\":[\"update\",\"Jim\",\"\"],\"user.medias[37]\":[\"add\"],\"user.medias[37].\":[\"add\"],\"user.medias[37].mediatypeid\":[\"add\",\"1\"],\"user.medias[37].sendto\":[\"add\",\"support123@company.com\"]}"                      },         {             "auditid": "ckssofl0p0001yhdcqxclsg8r",             "userid": "1",             "username": "Admin",             "clock": "1629967278",             "ip": "127.0.0.1",             "action": "0",             "resourcetype": "0",             "resourceid": "20",             "resourcename": "John",             "recordsetid": "ckssofl0p0000yhdcpxyo1jgo",             "details": "{\"user.username\":[\"add\",\"John\"], \"user.userid:\":[\"add\",\"20\"],\"user.usrgrps[28]\":[\"add\"],\"user.usrgrps[28].usrgrpid\":[\"add\", \"7\"]}"         }     ],     "id": 1 } ```

en-us	#### Retrieve correlations  Retrieve all configured correlations together with correlation conditions and operations. The filter uses the "and/or" evaluation type, so the `formula` property is empty and `eval_formula` is generated automatically.  Request:  ```json {     "jsonrpc": "2.0",     "method": "correlation.get",     "params": {         "output": "extend",         "selectOperations": "extend",         "selectFilter": "extend"     },     "auth": "343baad4f88b4106b9b5961e77437688",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "correlationid": "1",             "name": "Correlation 1",             "description": "",             "status": "0",             "filter": {                 "evaltype": "0",                 "formula": "",                 "conditions": [                     {                         "type": "3",                         "oldtag": "error",                         "newtag": "ok",                         "formulaid": "A"                     }                 ],                 "eval_formula": "A"             },             "operations": [                 {                     "type": "0"                 }             ]         }     ],     "id": 1 } ```
zh-cn	 #### 检索关联  获取所有配置的关联以及关联条件和操作。该过滤器使用“and/or”评估类型，因此 `formula`属性为空，并自动生成`eval_formula`。  请求:  ```json {     "jsonrpc": "2.0",     "method": "correlation.get",     "params": {         "output": "extend",         "selectOperations": "extend",         "selectFilter": "extend"     },     "auth": "343baad4f88b4106b9b5961e77437688",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "correlationid": "1",             "name": "Correlation 1",             "description": "",             "status": "0",             "filter": {                 "evaltype": "0",                 "formula": "",                 "conditions": [                     {                         "type": "3",                         "oldtag": "error",                         "newtag": "ok",                         "formulaid": "A"                     }                 ],                 "eval_formula": "A"             },             "operations": [                 {                     "type": "0"                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieve discovered hosts by discovery rule  Retrieve all hosts and the discovered services they are running that have been detected by discovery rule "4".  Request:  ```json {     "jsonrpc": "2.0",     "method": "dhost.get",     "params": {         "output": "extend",         "selectDServices": "extend",         "druleids": "4"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "dservices": [                 {                     "dserviceid": "1",                     "dhostid": "1",                     "type": "4",                     "key_": "",                     "value": "",                     "port": "80",                     "status": "0",                     "lastup": "1337697227",                     "lastdown": "0",                     "dcheckid": "5",                     "ip": "192.168.1.1",                     "dns": "station.company.lan"                 }             ],             "dhostid": "1",             "druleid": "4",             "status": "0",             "lastup": "1337697227",             "lastdown": "0"         },         {             "dservices": [                 {                     "dserviceid": "2",                     "dhostid": "2",                     "type": "4",                     "key_": "",                     "value": "",                     "port": "80",                     "status": "0",                     "lastup": "1337697234",                     "lastdown": "0",                     "dcheckid": "5",                     "ip": "192.168.1.4",                     "dns": "john.company.lan"                 }             ],             "dhostid": "2",             "druleid": "4",             "status": "0",             "lastup": "1337697234",             "lastdown": "0"         },         {             "dservices": [                 {                     "dserviceid": "3",                     "dhostid": "3",                     "type": "4",                     "key_": "",                     "value": "",                     "port": "80",                     "status": "0",                     "lastup": "1337697234",                     "lastdown": "0",                     "dcheckid": "5",                     "ip": "192.168.1.26",                     "dns": "printer.company.lan"                 }             ],             "dhostid": "3",             "druleid": "4",             "status": "0",             "lastup": "1337697234",             "lastdown": "0"         },         {             "dservices": [                 {                     "dserviceid": "4",                     "dhostid": "4",                     "type": "4",                     "key_": "",                     "value": "",                     "port": "80",                     "status": "0",                     "lastup": "1337697234",                     "lastdown": "0",                     "dcheckid": "5",                     "ip": "192.168.1.7",                     "dns": "mail.company.lan"                 }             ],             "dhostid": "4",             "druleid": "4",             "status": "0",             "lastup": "1337697234",             "lastdown": "0"         }     ],     "id": 1 } ```
zh-cn	#### 通过发现规则检索发现的主机  检索发现规则"4"检测到的所有主机及其正在运行的已发现服务。  请求:  ```json {     "jsonrpc": "2.0",     "method": "dhost.get",     "params": {         "output": "extend",         "selectDServices": "extend",         "druleids": "4"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "dservices": [                 {                     "dserviceid": "1",                     "dhostid": "1",                     "type": "4",                     "key_": "",                     "value": "",                     "port": "80",                     "status": "0",                     "lastup": "1337697227",                     "lastdown": "0",                     "dcheckid": "5",                     "ip": "192.168.1.1",                     "dns": "station.company.lan"                 }             ],             "dhostid": "1",             "druleid": "4",             "status": "0",             "lastup": "1337697227",             "lastdown": "0"         },         {             "dservices": [                 {                     "dserviceid": "2",                     "dhostid": "2",                     "type": "4",                     "key_": "",                     "value": "",                     "port": "80",                     "status": "0",                     "lastup": "1337697234",                     "lastdown": "0",                     "dcheckid": "5",                     "ip": "192.168.1.4",                     "dns": "john.company.lan"                 }             ],             "dhostid": "2",             "druleid": "4",             "status": "0",             "lastup": "1337697234",             "lastdown": "0"         },         {             "dservices": [                 {                     "dserviceid": "3",                     "dhostid": "3",                     "type": "4",                     "key_": "",                     "value": "",                     "port": "80",                     "status": "0",                     "lastup": "1337697234",                     "lastdown": "0",                     "dcheckid": "5",                     "ip": "192.168.1.26",                     "dns": "printer.company.lan"                 }             ],             "dhostid": "3",             "druleid": "4",             "status": "0",             "lastup": "1337697234",             "lastdown": "0"         },         {             "dservices": [                 {                     "dserviceid": "4",                     "dhostid": "4",                     "type": "4",                     "key_": "",                     "value": "",                     "port": "80",                     "status": "0",                     "lastup": "1337697234",                     "lastdown": "0",                     "dcheckid": "5",                     "ip": "192.168.1.7",                     "dns": "mail.company.lan"                 }             ],             "dhostid": "4",             "druleid": "4",             "status": "0",             "lastup": "1337697234",             "lastdown": "0"         }     ],     "id": 1 } ```

en-us	#### Retrieve discovery actions  Retrieve all configured discovery actions together with action conditions and operations. The filter uses the "and" evaluation type, so the `formula` property is empty and `eval_formula` is generated automatically.  Request:  ```json {     "jsonrpc": "2.0",     "method": "action.get",     "params": {         "output": "extend",         "selectOperations": "extend"         "selectFilter": "extend",         "filter": {             "eventsource": 1         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "actionid": "2",             "name": "Auto discovery. Linux servers.",             "eventsource": "1",             "status": "1",             "esc_period": "0s",             "pause_suppressed": "1",             "filter": {                 "evaltype": "0",                 "formula": "",                 "conditions": [                     {                         "conditiontype": "10",                         "operator": "0",                         "value": "0",                         "value2": "",                         "formulaid": "B"                     },                     {                         "conditiontype": "8",                         "operator": "0",                         "value": "9",                         "value2": "",                         "formulaid": "C"                     },                     {                         "conditiontype": "12",                         "operator": "2",                         "value": "Linux",                         "value2": "",                         "formulaid": "A"                     }                 ],                 "eval_formula": "A and B and C"             },             "operations": [                 {                     "operationid": "1",                     "actionid": "2",                     "operationtype": "6",                     "esc_period": "0s",                     "esc_step_from": "1",                     "esc_step_to": "1",                     "evaltype": "0",                     "opconditions": [],                     "optemplate": [                         {                             "templateid": "10001"                         }                     ]                 },                 {                     "operationid": "2",                     "actionid": "2",                     "operationtype": "4",                     "esc_period": "0s",                     "esc_step_from": "1",                     "esc_step_to": "1",                     "evaltype": "0",                     "opconditions": [],                     "opgroup": [                         {                             "groupid": "2"                         }                     ]                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 检索发现动作  检索所有已配置的发现动作以及它们的动作条件和操作。过滤器使用 "and" 计算类型，所以 `formula` 属性为空且`eval_formula` 将自动生成。  请求：  ```json {     "jsonrpc": "2.0",     "method": "action.get",     "params": {         "output": "extend",         "selectOperations": "extend"         "selectFilter": "extend",         "filter": {             "eventsource": 1         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "actionid": "2",             "name": "Auto discovery. Linux servers.",             "eventsource": "1",             "status": "1",             "esc_period": "0s",             "pause_suppressed": "1",             "filter": {                 "evaltype": "0",                 "formula": "",                 "conditions": [                     {                         "conditiontype": "10",                         "operator": "0",                         "value": "0",                         "value2": "",                         "formulaid": "B"                     },                     {                         "conditiontype": "8",                         "operator": "0",                         "value": "9",                         "value2": "",                         "formulaid": "C"                     },                     {                         "conditiontype": "12",                         "operator": "2",                         "value": "Linux",                         "value2": "",                         "formulaid": "A"                     }                 ],                 "eval_formula": "A and B and C"             },             "operations": [                 {                     "operationid": "1",                     "actionid": "2",                     "operationtype": "6",                     "esc_period": "0s",                     "esc_step_from": "1",                     "esc_step_to": "1",                     "evaltype": "0",                     "opconditions": [],                     "optemplate": [                         {                             "templateid": "10001"                         }                     ]                 },                 {                     "operationid": "2",                     "actionid": "2",                     "operationtype": "4",                     "esc_period": "0s",                     "esc_step_from": "1",                     "esc_step_to": "1",                     "evaltype": "0",                     "opconditions": [],                     "opgroup": [                         {                             "groupid": "2"                         }                     ]                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieve discovery checks for a discovery rule  Retrieve all discovery checks used by discovery rule "6".  Request:  ```json {     "jsonrpc": "2.0",     "method": "dcheck.get",     "params": {         "output": "extend",         "dcheckids": "6"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "dcheckid": "6",             "druleid": "4",             "type": "3",             "key_": "",             "snmp_community": "",             "ports": "21",             "snmpv3_securityname": "",             "snmpv3_securitylevel": "0",             "snmpv3_authpassphrase": "",             "snmpv3_privpassphrase": "",             "uniq": "0",             "snmpv3_authprotocol": "0",             "snmpv3_privprotocol": "0",             "host_source": "1",             "name_source": "0"                     }     ],     "id": 1 } ```
zh-cn	 #### 检索发现规则的发现检查  检索被发现规则“6”使用的所有发现检查。  请求：  ```json {     "jsonrpc": "2.0",     "method": "dcheck.get",     "params": {         "output": "extend",         "dcheckids": "6"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "dcheckid": "6",             "druleid": "4",             "type": "3",             "key_": "",             "snmp_community": "",             "ports": "21",             "snmpv3_securityname": "",             "snmpv3_securitylevel": "0",             "snmpv3_authpassphrase": "",             "snmpv3_privpassphrase": "",             "uniq": "0",             "snmpv3_authprotocol": "0",             "snmpv3_privprotocol": "0",             "host_source": "1",             "name_source": "0"                     }     ],     "id": 1 } ```

en-us	#### Retrieve host interfaces  Retrieve all data about the interfaces used by host "30057."  Request:  ```json {     "jsonrpc": "2.0",     "method": "hostinterface.get",     "params": {         "output": "extend",         "hostids": "30057"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "interfaceid": "50039",             "hostid": "30057",             "main": "1",             "type": "1",             "useip": "1",             "ip": "::1",             "dns": "",             "port": "10050",             "available": "0",             "error": "",             "errors_from": "0",             "disable_until": "0",             "details": []         },         {             "interfaceid": "55082",             "hostid": "30057",             "main": "0",             "type": "1",             "useip": "1",             "ip": "127.0.0.1",             "dns": "",             "port": "10051",             "available": "0",             "error": "",             "errors_from": "0",             "disable_until": "0",             "details": {                 "version": "2",                 "bulk": "0",                 "community": "{$SNMP_COMMUNITY}"             }         }     ],     "id": 1 } ```
zh-cn	#### 获取主机接口  获取ID为30057的主机使用的接口所有数据。  请求:  ```json {     "jsonrpc": "2.0",     "method": "hostinterface.get",     "params": {         "output": "extend",         "hostids": "30057"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "interfaceid": "50039",             "hostid": "30057",             "main": "1",             "type": "1",             "useip": "1",             "ip": "::1",             "dns": "",             "port": "10050",             "available": "0",             "error": "",             "errors_from": "0",             "disable_until": "0",             "details": []         },         {             "interfaceid": "55082",             "hostid": "30057",             "main": "0",             "type": "1",             "useip": "1",             "ip": "127.0.0.1",             "dns": "",             "port": "10051",             "available": "0",             "error": "",             "errors_from": "0",             "disable_until": "0",             "details": {                 "version": "2",                 "bulk": "0",                 "community": "{$SNMP_COMMUNITY}"             }         }     ],     "id": 1 } ```

en-us	#### Retrieve LLD rule by URL  Retrieve LLD rule for host by rule URL field value. Only exact match of URL string defined for LLD rule is supported.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "hostids": "10257",         "filter": {             "type": "19",             "url": "http://127.0.0.1/discoverer.php"         }     },     "id": 39,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28336",             "type": "19",             "snmp_oid": "",             "hostid": "10257",             "name": "API HTTP agent",             "key_": "api_discovery_rule",             "delay": "5s",             "history": "90d",             "trends": "0",             "status": "0",             "value_type": "4",             "trapper_hosts": "",             "units": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "1",             "interfaceid": "5",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "http://127.0.0.1/discoverer.php",             "query_fields": [                 {                     "mode": "json"                 },                 {                     "elements": "2"                 }             ],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": {                 "X-Type": "api",                 "Authorization": "Bearer mF_A.B5f-2.1JcM"             },             "retrieve_mode": "0",             "request_method": "1",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         }     ],     "id": 39 } ```
zh-cn	#### 通过 URL 检索 LLD 规则  通过规则 URL 字段值检索主机的 LLD 规则。仅支持为 LLD 规则定义的 URL 字符串的完全匹配。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "hostids": "10257",         "filter": {             "type": "19",             "url": "http://127.0.0.1/discoverer.php"         }     },     "id": 39,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28336",             "type": "19",             "snmp_oid": "",             "hostid": "10257",             "name": "API HTTP agent",             "key_": "api_discovery_rule",             "delay": "5s",             "history": "90d",             "trends": "0",             "status": "0",             "value_type": "4",             "trapper_hosts": "",             "units": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "1",             "interfaceid": "5",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "http://127.0.0.1/discoverer.php",             "query_fields": [                 {                     "mode": "json"                 },                 {                     "elements": "2"                 }             ],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": {                 "X-Type": "api",                 "Authorization": "Bearer mF_A.B5f-2.1JcM"             },             "retrieve_mode": "0",             "request_method": "1",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         }     ],     "id": 39 } ```

en-us	#### Retrieve LLD rule by URL  Retrieve LLD rule for host by rule URL field value. Only exact match of URL string defined for LLD rule is supported.  Request:  ```json {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "hostids": "10257",         "filter": {             "type": 19,             "url": "http://127.0.0.1/discoverer.php"         }     },     "id": 39,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28336",             "type": "19",             "snmp_oid": "",             "hostid": "10257",             "name": "API HTTP agent",             "key_": "api_discovery_rule",             "delay": "5s",             "status": "0",             "trapper_hosts": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "5",             "description": "",             "lifetime": "30d",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "http://127.0.0.1/discoverer.php",             "query_fields": [                 {                     "mode": "json"                 },                 {                     "elements": "2"                 }             ],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": {                 "X-Type": "api",                 "Authorization": "Bearer mF_A.B5f-2.1JcM"             },             "retrieve_mode": "0",             "request_method": "1",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": []         }     ],     "id": 39 } ```
zh-cn	#### 通过 URL 检索 LLD 规则  通过规则 URL 字段值检索主机的 LLD 规则。仅支持为 LLD 规则定义的 URL 字符串的完全匹配。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "hostids": "10257",         "filter": {             "type": "19",             "url": "http://127.0.0.1/discoverer.php"         }     },     "id": 39,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28336",             "type": "19",             "snmp_oid": "",             "hostid": "10257",             "name": "API HTTP agent",             "key_": "api_discovery_rule",             "delay": "5s",             "history": "90d",             "trends": "0",             "status": "0",             "value_type": "4",             "trapper_hosts": "",             "units": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "1",             "interfaceid": "5",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "http://127.0.0.1/discoverer.php",             "query_fields": [                 {                     "mode": "json"                 },                 {                     "elements": "2"                 }             ],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": {                 "X-Type": "api",                 "Authorization": "Bearer mF_A.B5f-2.1JcM"             },             "retrieve_mode": "0",             "request_method": "1",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         }     ],     "id": 39 } ```

en-us	#### Retrieve LLD rule with overrides  Retrieve one LLD rule that has various override settings.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": ["name"],         "itemids": "30980",         "selectOverrides": ["name", "step", "stop", "filter", "operations"]     },     "id": 39,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "name": "Discover database host"             "overrides": [                 {                     "name": "Discover MySQL host",                     "step": "1",                     "stop": "1",                     "filter": {                         "evaltype": "2",                         "formula": "",                         "conditions": [                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^mysqld\\.service$"                                 "formulaid": "A"                             },                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^mariadb\\.service$"                                 "formulaid": "B"                             }                         ],                         "eval_formula": "A or B"                     },                     "operations": [                         {                             "operationobject": "3",                             "operator": "2",                             "value": "Database host",                             "opstatus": {                                 "status": "0"                             },                             "optag": [                                 {                                     "tag": "Database",                                     "value": "MySQL"                                 }                             ],                             "optemplate": [                                 {                                     "templateid": "10170"                                 }                             ]                         }                     ]                 },                 {                     "name": "Discover PostgreSQL host",                     "step": "2",                     "stop": "1",                     "filter": {                         "evaltype": "0",                         "formula": "",                         "conditions": [                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^postgresql\\.service$"                                 "formulaid": "A"                             }                         ],                         "eval_formula": "A"                     },                     "operations": [                         {                             "operationobject": "3",                             "operator": "2",                             "value": "Database host",                             "opstatus": {                                 "status": "0"                             },                             "optag": [                                 {                                     "tag": "Database",                                     "value": "PostgreSQL"                                 }                             ],                             "optemplate": [                                 {                                     "templateid": "10263"                                 }                             ]                         }                     ]                 }             ]         }     ],     "id": 39 } ```
zh-cn	#### 使用覆盖检索 LLD 规则  检索具有各种覆盖设置的 LLD 规则。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": ["name"],         "itemids": "30980",         "selectOverrides": ["name", "step", "stop", "filter", "operations"]     },     "id": 39,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "name": "Discover database host"             "overrides": [                 {                     "name": "Discover MySQL host",                     "step": "1",                     "stop": "1",                     "filter": {                         "evaltype": "2",                         "formula": "",                         "conditions": [                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^mysqld\\.service$"                                 "formulaid": "A"                             },                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^mariadb\\.service$"                                 "formulaid": "B"                             }                         ],                         "eval_formula": "A or B"                     },                     "operations": [                         {                             "operationobject": "3",                             "operator": "2",                             "value": "Database host",                             "opstatus": {                                 "status": "0"                             },                             "optag": [                                 {                                     "tag": "Database",                                     "value": "MySQL"                                 }                             ],                             "optemplate": [                                 {                                     "templateid": "10170"                                 }                             ]                         }                     ]                 },                 {                     "name": "Discover PostgreSQL host",                     "step": "2",                     "stop": "1",                     "filter": {                         "evaltype": "0",                         "formula": "",                         "conditions": [                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^postgresql\\.service$"                                 "formulaid": "A"                             }                         ],                         "eval_formula": "A"                     },                     "operations": [                         {                             "operationobject": "3",                             "operator": "2",                             "value": "Database host",                             "opstatus": {                                 "status": "0"                             },                             "optag": [                                 {                                     "tag": "Database",                                     "value": "PostgreSQL"                                 }                             ],                             "optemplate": [                                 {                                     "templateid": "10263"                                 }                             ]                         }                     ]                 }             ]         }     ],     "id": 39 } ```

en-us	#### Retrieve LLD rule with overrides  Retrieve one LLD rule that has various override settings.  Request:  ```json {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": ["name"],         "itemids": "30980",         "selectOverrides": ["name", "step", "stop", "filter", "operations"]     },     "id": 39,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "name": "Discover database host",             "overrides": [                 {                     "name": "Discover MySQL host",                     "step": "1",                     "stop": "1",                     "filter": {                         "evaltype": "2",                         "formula": "",                         "conditions": [                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^mysqld\\.service$",                                 "formulaid": "A"                             },                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^mariadb\\.service$",                                 "formulaid": "B"                             }                         ],                         "eval_formula": "A or B"                     },                     "operations": [                         {                             "operationobject": "3",                             "operator": "2",                             "value": "Database host",                             "opstatus": {                                 "status": "0"                             },                             "optag": [                                 {                                     "tag": "Database",                                     "value": "MySQL"                                 }                             ],                             "optemplate": [                                 {                                     "templateid": "10170"                                 }                             ]                         }                     ]                 },                 {                     "name": "Discover PostgreSQL host",                     "step": "2",                     "stop": "1",                     "filter": {                         "evaltype": "0",                         "formula": "",                         "conditions": [                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^postgresql\\.service$",                                 "formulaid": "A"                             }                         ],                         "eval_formula": "A"                     },                     "operations": [                         {                             "operationobject": "3",                             "operator": "2",                             "value": "Database host",                             "opstatus": {                                 "status": "0"                             },                             "optag": [                                 {                                     "tag": "Database",                                     "value": "PostgreSQL"                                 }                             ],                             "optemplate": [                                 {                                     "templateid": "10263"                                 }                             ]                         }                     ]                 }             ]         }     ],     "id": 39 } ```
zh-cn	#### 使用覆盖检索 LLD 规则  检索具有各种覆盖设置的 LLD 规则。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": ["name"],         "itemids": "30980",         "selectOverrides": ["name", "step", "stop", "filter", "operations"]     },     "id": 39,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "name": "Discover database host"             "overrides": [                 {                     "name": "Discover MySQL host",                     "step": "1",                     "stop": "1",                     "filter": {                         "evaltype": "2",                         "formula": "",                         "conditions": [                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^mysqld\\.service$"                                 "formulaid": "A"                             },                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^mariadb\\.service$"                                 "formulaid": "B"                             }                         ],                         "eval_formula": "A or B"                     },                     "operations": [                         {                             "operationobject": "3",                             "operator": "2",                             "value": "Database host",                             "opstatus": {                                 "status": "0"                             },                             "optag": [                                 {                                     "tag": "Database",                                     "value": "MySQL"                                 }                             ],                             "optemplate": [                                 {                                     "templateid": "10170"                                 }                             ]                         }                     ]                 },                 {                     "name": "Discover PostgreSQL host",                     "step": "2",                     "stop": "1",                     "filter": {                         "evaltype": "0",                         "formula": "",                         "conditions": [                             {                                 "macro": "{#UNIT.NAME}",                                 "operator": "8",                                 "value": "^postgresql\\.service$"                                 "formulaid": "A"                             }                         ],                         "eval_formula": "A"                     },                     "operations": [                         {                             "operationobject": "3",                             "operator": "2",                             "value": "Database host",                             "opstatus": {                                 "status": "0"                             },                             "optag": [                                 {                                     "tag": "Database",                                     "value": "PostgreSQL"                                 }                             ],                             "optemplate": [                                 {                                     "templateid": "10263"                                 }                             ]                         }                     ]                 }             ]         }     ],     "id": 39 } ```

en-us	#### Retrieve scripts by host IDs  Retrieve all scripts available on hosts "30079" and "30073".  Request:  ```json {     "jsonrpc": "2.0",     "method": "script.getscriptsbyhosts",     "params": [         "30079",         "30073"     ],     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "30079": [             {                 "scriptid": "3",                 "name": "Detect operating system",                 "command": "sudo /usr/bin/nmap -O {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "7",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             },             {                 "scriptid": "1",                 "name": "Ping",                 "command": "/bin/ping -c 3 {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "0",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             },             {                 "scriptid": "2",                 "name": "Traceroute",                 "command": "/usr/bin/traceroute {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "0",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             }         ],         "30073": [             {                 "scriptid": "3",                 "name": "Detect operating system",                 "command": "sudo /usr/bin/nmap -O {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "7",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             },             {                 "scriptid": "1",                 "name": "Ping",                 "command": "/bin/ping -c 3 {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "0",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             },             {                 "scriptid": "2",                 "name": "Traceroute",                 "command": "/usr/bin/traceroute {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "0",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             }         ]     },     "id": 1 } ```
zh-cn	#### 通过主机ID检索脚本  检索主机“30079”和“30073”上所有脚本。  请求：  ```json {     "jsonrpc": "2.0",     "method": "script.getscriptsbyhosts",     "params": [         "30079",         "30073"     ],     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "30079": [             {                 "scriptid": "3",                 "name": "Detect operating system",                 "command": "sudo /usr/bin/nmap -O {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "7",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             },             {                 "scriptid": "1",                 "name": "Ping",                 "command": "/bin/ping -c 3 {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "0",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             },             {                 "scriptid": "2",                 "name": "Traceroute",                 "command": "/usr/bin/traceroute {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "0",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             }         ],         "30073": [             {                 "scriptid": "3",                 "name": "Detect operating system",                 "command": "sudo /usr/bin/nmap -O {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "7",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             },             {                 "scriptid": "1",                 "name": "Ping",                 "command": "/bin/ping -c 3 {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "0",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             },             {                 "scriptid": "2",                 "name": "Traceroute",                 "command": "/usr/bin/traceroute {HOST.CONN} 2>&1",                 "host_access": "2",                 "usrgrpid": "0",                 "groupid": "0",                 "description": "",                 "confirmation": "",                 "type": "0",                 "execute_on": "1",                 "hostid": "10001"             }         ]     },     "id": 1 } ```

en-us	#### Retrieve services discovered on a host  Retrieve all discovered services detected on discovered host "11".  Request:  ```json {     "jsonrpc": "2.0",     "method": "dservice.get",     "params": {         "output": "extend",         "dhostids": "11"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "dserviceid": "12",             "dhostid": "11",             "value": "",             "port": "80",             "status": "1",             "lastup": "0",             "lastdown": "1348650607",             "dcheckid": "5",             "ip": "192.168.1.134",             "dns": "john.local"         },         {             "dserviceid": "13",             "dhostid": "11",             "value": "",             "port": "21",             "status": "1",             "lastup": "0",             "lastdown": "1348650610",             "dcheckid": "6",             "ip": "192.168.1.134",             "dns": "john.local"         }     ],     "id": 1 } ```
zh-cn	#### 检索在主机上被发现的服务  检索在被发现主机“11”上检测出的所有被发现的服务。  请求：  ```json {     "jsonrpc": "2.0",     "method": "dservice.get",     "params": {         "output": "extend",         "dhostids": "11"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "dserviceid": "12",             "dhostid": "11",             "value": "",             "port": "80",             "status": "1",             "lastup": "0",             "lastdown": "1348650607",             "dcheckid": "5",             "ip": "192.168.1.134",             "dns": "john.local"         },         {             "dserviceid": "13",             "dhostid": "11",             "value": "",             "port": "21",             "status": "1",             "lastup": "0",             "lastdown": "1348650610",             "dcheckid": "6",             "ip": "192.168.1.134",             "dns": "john.local"         }     ],     "id": 1 } ```

en-us	#### Retrieve task by ID  Retrieve all data about task “1”.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "task.get",     "params": {         "output": "extend",         "taskids": "1"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "taskid": "1",             "type": "7",             "status": "3",             "clock": "1601039076",             "ttl": "3600",             "proxy_hostid": null,             "request": {                 "alerting": {                     "stats": [                         "alerts"                     ],                     "top": {                         "media.alerts": 10                     }                 },                 "lld": {                     "stats": "extend",                     "top": {                         "values": 5                     }                 }             },             "result": {                 "data": {                     "alerting": {                         "alerts": 0,                         "top": {                             "media.alerts": []                         },                         "time": 0.000663                     },                     "lld": {                         "rules": 0,                         "values": 0,                         "top": {                             "values": []                         },                         "time": 0.000442                     }                 },                 "status": "0"             }         }     ],     "id": 1 } ```
zh-cn	#### 通过ID获取task  检索任务“1”的所有数据。  请求:  ``` {.java} {     "jsonrpc": "2.0",     "method": "task.get",     "params": {         "output": "extend",         "taskids": "1"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "taskid": "1",             "type": "7",             "status": "3",             "clock": "1601039076",             "ttl": "3600",             "proxy_hostid": null,             "request": {                 "alerting": {                     "stats": [                         "alerts"                     ],                     "top": {                         "media.alerts": 10                     }                 },                 "lld": {                     "stats": "extend",                     "top": {                         "values": 5                     }                 }             },             "result": {                 "data": {                     "alerting": {                         "alerts": 0,                         "top": {                             "media.alerts": []                         },                         "time": 0.000663                     },                     "lld": {                         "rules": 0,                         "values": 0,                         "top": {                             "values": []                         },                         "time": 0.000442                     }                 },                 "status": "0"             }         }     ],     "id": 1 } ```

en-us	#### Retrieve task by ID  Retrieve all the data about the task with the ID "1".  Request:  ```json {     "jsonrpc": "2.0",     "method": "task.get",     "params": {         "output": "extend",         "taskids": "1"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "taskid": "1",             "type": "7",             "status": "3",             "clock": "1601039076",             "ttl": "3600",             "proxy_hostid": null,             "request": {                 "alerting": {                     "stats": [                         "alerts"                     ],                     "top": {                         "media.alerts": 10                     }                 },                 "lld": {                     "stats": "extend",                     "top": {                         "values": 5                     }                 }             },             "result": {                 "data": {                     "alerting": {                         "alerts": 0,                         "top": {                             "media.alerts": []                         },                         "time": 0.000663                     },                     "lld": {                         "rules": 0,                         "values": 0,                         "top": {                             "values": []                         },                         "time": 0.000442                     }                 },                 "status": "0"             }         }     ],     "id": 1 } ```
zh-cn	#### 通过ID获取task  检索任务“1”的所有数据。  请求:  ``` {.java} {     "jsonrpc": "2.0",     "method": "task.get",     "params": {         "output": "extend",         "taskids": "1"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "taskid": "1",             "type": "7",             "status": "3",             "clock": "1601039076",             "ttl": "3600",             "proxy_hostid": null,             "request": {                 "alerting": {                     "stats": [                         "alerts"                     ],                     "top": {                         "media.alerts": 10                     }                 },                 "lld": {                     "stats": "extend",                     "top": {                         "values": 5                     }                 }             },             "result": {                 "data": {                     "alerting": {                         "alerts": 0,                         "top": {                             "media.alerts": []                         },                         "time": 0.000663                     },                     "lld": {                         "rules": 0,                         "values": 0,                         "top": {                             "values": []                         },                         "time": 0.000442                     }                 },                 "status": "0"             }         }     ],     "id": 1 } ```

en-us	#### Retrieve trigger actions  Retrieve all configured trigger actions together with action conditions and operations.  Request:  ```json {     "jsonrpc": "2.0",     "method": "action.get",     "params": {         "output": "extend",         "selectOperations": "extend",         "selectRecoveryOperations": "extend",         "selectUpdateOperations": "extend",         "selectFilter": "extend",         "filter": {             "eventsource": 0         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "actionid": "3",             "name": "Report problems to Zabbix administrators",             "eventsource": "0",             "status": "1",             "esc_period": "1h",             "pause_suppressed": "1",             "filter": {                 "evaltype": "0",                 "formula": "",                 "conditions": [],                 "eval_formula": ""             },             "operations": [                 {                     "operationid": "3",                     "actionid": "3",                     "operationtype": "0",                     "esc_period": "0",                     "esc_step_from": "1",                     "esc_step_to": "1",                     "evaltype": "0",                     "opconditions": [],                     "opmessage": [                         {                             "default_msg": "1",                             "subject": "",                             "message": "",                             "mediatypeid" => "0"                         }                     ],                     "opmessage_grp": [                         {                             "usrgrpid": "7"                         }                     ]                 }             ],             "recovery_operations": [                 {                     "operationid": "7",                     "actionid": "3",                     "operationtype": "11",                     "evaltype": "0",                     "opconditions": [],                     "opmessage": {                         "default_msg": "0",                         "subject": "{TRIGGER.STATUS}: {TRIGGER.NAME}",                         "message": "Trigger: {TRIGGER.NAME}\r\nTrigger status: {TRIGGER.STATUS}\r\nTrigger severity: {TRIGGER.SEVERITY}\r\nTrigger URL: {TRIGGER.URL}\r\n\r\nItem values:\r\n\r\n1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}\r\n2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}\r\n3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}\r\n\r\nOriginal event ID: {EVENT.ID}",                         "mediatypeid": "0"                     }                 }             ],             "update_operations": [                 {                     "operationid": "31",                     "operationtype": "12",                     "evaltype": "0",                     "opmessage": {                         "default_msg": "1",                         "subject": "",                         "message": "",                         "mediatypeid": "0"                     }                 },                 {                     "operationid": "32",                     "operationtype": "0",                     "evaltype": "0",                     "opmessage": {                         "default_msg": "0",                         "subject": "Updated: {TRIGGER.NAME}",                         "message": "{USER.FULLNAME} updated problem at {EVENT.UPDATE.DATE} {EVENT.UPDATE.TIME} with the following message:\r\n{EVENT.UPDATE.MESSAGE}\r\n\r\nCurrent problem status is {EVENT.STATUS}",                         "mediatypeid": "1"                     },                     "opmessage_grp": [                         {                             "usrgrpid": "7"                         }                     ],                     "opmessage_usr": []                 },                 {                     "operationid": "33",                     "operationtype": "1",                     "evaltype": "0",                     "opcommand": {                         "scriptid": "3"                     },                     "opcommand_hst": [                         {                             "hostid": "10084"                         }                     ],                     "opcommand_grp": []                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 检索触发器动作  检索所有已配置的触发器动作以及它们的动作条件和操作。  请求：  ```json {     "jsonrpc": "2.0",     "method": "action.get",     "params": {         "output": "extend",         "selectOperations": "extend",         "selectRecoveryOperations": "extend",         "selectUpdateOperations": "extend",         "selectFilter": "extend",         "filter": {             "eventsource": 0         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "actionid": "3",             "name": "Report problems to Zabbix administrators",             "eventsource": "0",             "status": "1",             "esc_period": "1h",             "pause_suppressed": "1",             "filter": {                 "evaltype": "0",                 "formula": "",                 "conditions": [],                 "eval_formula": ""             },             "operations": [                 {                     "operationid": "3",                     "actionid": "3",                     "operationtype": "0",                     "esc_period": "0",                     "esc_step_from": "1",                     "esc_step_to": "1",                     "evaltype": "0",                     "opconditions": [],                     "opmessage": [                         {                             "default_msg": "1",                             "subject": "",                             "message": "",                             "mediatypeid" => "0"                         }                     ],                     "opmessage_grp": [                         {                             "usrgrpid": "7"                         }                     ]                 }             ],             "recovery_operations": [                 {                     "operationid": "7",                     "actionid": "3",                     "operationtype": "11",                     "evaltype": "0",                     "opconditions": [],                     "opmessage": {                         "default_msg": "0",                         "subject": "{TRIGGER.STATUS}: {TRIGGER.NAME}",                         "message": "Trigger: {TRIGGER.NAME}\r\nTrigger status: {TRIGGER.STATUS}\r\nTrigger severity: {TRIGGER.SEVERITY}\r\nTrigger URL: {TRIGGER.URL}\r\n\r\nItem values:\r\n\r\n1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}\r\n2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}\r\n3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}\r\n\r\nOriginal event ID: {EVENT.ID}",                         "mediatypeid": "0"                     }                 }             ],             "update_operations": [                 {                     "operationid": "31",                     "operationtype": "12",                     "evaltype": "0",                     "opmessage": {                         "default_msg": "1",                         "subject": "",                         "message": "",                         "mediatypeid": "0"                     }                 },                 {                     "operationid": "32",                     "operationtype": "0",                     "evaltype": "0",                     "opmessage": {                         "default_msg": "0",                         "subject": "Updated: {TRIGGER.NAME}",                         "message": "{USER.FULLNAME} updated problem at {EVENT.UPDATE.DATE} {EVENT.UPDATE.TIME} with the following message:\r\n{EVENT.UPDATE.MESSAGE}\r\n\r\nCurrent problem status is {EVENT.STATUS}",                         "mediatypeid": "1"                     },                     "opmessage_grp": [                         {                             "usrgrpid": "7"                         }                     ],                     "opmessage_usr": []                 },                 {                     "operationid": "33",                     "operationtype": "1",                     "evaltype": "0",                     "opcommand": {                         "scriptid": "3"                     },                     "opcommand_hst": [                         {                             "hostid": "10084"                         }                     ],                     "opcommand_grp": []                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieve trigger prototypes from an LLD rule  Retrieve all trigger prototypes and their functions from an LLD rule.  Request:  ```json {     "jsonrpc": "2.0",     "method": "triggerprototype.get",     "params": {         "output": "extend",         "selectFunctions": "extend",         "discoveryids": "22450"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "triggerid": "13272",             "expression": "{12598}<20",             "description": "Free inodes is less than 20% on volume {#FSNAME}",             "url": "",             "status": "0",             "priority": "2",             "comments": "",             "templateid": "0",             "type": "0",             "flags": "2",             "recovery_mode": "0",             "recovery_expression": "",             "correlation_mode": "0",             "correlation_tag": "",             "manual_close": "0",             "opdata": "",             "discover": "0",             "functions": [                 {                     "functionid": "12598",                     "itemid": "22454",                     "triggerid": "13272",                     "parameter": "$",                     "function": "last"                 }             ]         },         {             "triggerid": "13266",             "expression": "{13500}<20",             "description": "Free disk space is less than 20% on volume {#FSNAME}",             "url": "",             "status": "0",             "priority": "2",             "comments": "",             "templateid": "0",             "type": "0",             "flags": "2",             "recovery_mode": "0",             "recovery_expression": "",             "correlation_mode": "0",             "correlation_tag": "",             "manual_close": "0",             "opdata": "",             "discover": "0",             "functions": [                 {                     "functionid": "13500",                     "itemid": "22686",                     "triggerid": "13266",                     "parameter": "$",                     "function": "last"                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 从LLD规则中检索触发器原型  从底层发现规则中检索所有的触发器原型和相关函数.  请求:  ```json {     "jsonrpc": "2.0",     "method": "triggerprototype.get",     "params": {         "output": "extend",         "selectFunctions": "extend",         "discoveryids": "22450"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "triggerid": "13272",             "expression": "{12598}<20",             "description": "Free inodes is less than 20% on volume {#FSNAME}",             "url": "",             "status": "0",             "priority": "2",             "comments": "",             "templateid": "0",             "type": "0",             "flags": "2",             "recovery_mode": "0",             "recovery_expression": "",             "correlation_mode": "0",             "correlation_tag": "",             "manual_close": "0",             "opdata": "",             "discover": "0",             "functions": [                 {                     "functionid": "12598",                     "itemid": "22454",                     "triggerid": "13272",                     "parameter": "$",                     "function": "last"                 }             ]         },         {             "triggerid": "13266",             "expression": "{13500}<20",             "description": "Free disk space is less than 20% on volume {#FSNAME}",             "url": "",             "status": "0",             "priority": "2",             "comments": "",             "templateid": "0",             "type": "0",             "flags": "2",             "recovery_mode": "0",             "recovery_expression": "",             "correlation_mode": "0",             "correlation_tag": "",             "manual_close": "0",             "opdata": "",             "discover": "0",             "functions": [                 {                     "functionid": "13500",                     "itemid": "22686",                     "triggerid": "13266",                     "parameter": "$",                     "function": "last"                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieving a dashboard by ID  Retrieve all data about dashboards "1" and "2".  Request:  ```json {     "jsonrpc": "2.0",     "method": "dashboard.get",     "params": {         "output": "extend",         "selectPages": "extend",         "selectUsers": "extend",         "selectUserGroups": "extend",         "dashboardids": [             "1",             "2"         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "dashboardid": "1",             "name": "Dashboard",             "userid": "1",             "private": "0",             "display_period": "30",             "auto_start": "1",             "users": [],             "userGroups": [],             "pages": [                 {                     "dashboard_pageid": "1",                     "name": "",                     "display_period": "0",                     "widgets": [                         {                             "widgetid": "9",                             "type": "systeminfo",                             "name": "",                             "x": "12",                             "y": "8",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "8",                             "type": "problemsbysv",                             "name": "",                             "x": "12",                             "y": "4",                             "width": "12",                             "height": "4",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "7",                             "type": "problemhosts",                             "name": "",                             "x": "12",                             "y": "0",                             "width": "12",                             "height": "4",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "6",                             "type": "discovery",                             "name": "",                             "x": "6",                             "y": "9",                             "width": "6",                             "height": "4",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "5",                             "type": "web",                             "name": "",                             "x": "0",                             "y": "9",                             "width": "6",                             "height": "4",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "4",                             "type": "problems",                             "name": "",                             "x": "0",                             "y": "3",                             "width": "12",                             "height": "6",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "3",                             "type": "favmaps",                             "name": "",                             "x": "8",                             "y": "0",                             "width": "4",                             "height": "3",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "1",                             "type": "favgraphs",                             "name": "",                             "x": "0",                             "y": "0",                             "width": "4",                             "height": "3",                             "view_mode": "0",                             "fields": []                         }                     ]                 },                 {                     "dashboard_pageid": "2",                     "name": "",                     "display_period": "0",                     "widgets": []                 },                 {                     "dashboard_pageid": "3",                     "name": "Custom page name",                     "display_period": "60",                     "widgets": []                 }             ]         },         {             "dashboardid": "2",             "name": "My dashboard",             "userid": "1",             "private": "1",             "display_period": "60",             "auto_start": "1",             "users": [                 {                     "userid": "4",                     "permission": "3"                 }             ],             "userGroups": [                 {                     "usrgrpid": "7",                     "permission": "2"                 }             ],             "pages": [                 {                     "dashboard_pageid": "4",                     "name": "",                     "display_period": "0",                     "widgets": [                         {                             "widgetid": "10",                             "type": "problems",                             "name": "",                             "x": "0",                             "y": "0",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "2",                                     "name": "groupids",                                     "value": "4"                                 }                             ]                         }                     ]                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 通过ID检索仪表盘  检索仪表盘 "1" 和 "2" 的所有数据。  请求：  ```json {     "jsonrpc": "2.0",     "method": "dashboard.get",     "params": {         "output": "extend",         "selectPages": "extend",         "selectUsers": "extend",         "selectUserGroups": "extend",         "dashboardids": [             "1",             "2"         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "dashboardid": "1",             "name": "Dashboard",             "userid": "1",             "private": "0",             "display_period": "30",             "auto_start": "1",             "users": [],             "userGroups": [],             "pages": [                 {                     "dashboard_pageid": "1",                     "name": "",                     "display_period": "0",                     "widgets": [                         {                             "widgetid": "9",                             "type": "systeminfo",                             "name": "",                             "x": "12",                             "y": "8",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "8",                             "type": "problemsbysv",                             "name": "",                             "x": "12",                             "y": "4",                             "width": "12",                             "height": "4",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "7",                             "type": "problemhosts",                             "name": "",                             "x": "12",                             "y": "0",                             "width": "12",                             "height": "4",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "6",                             "type": "discovery",                             "name": "",                             "x": "6",                             "y": "9",                             "width": "6",                             "height": "4",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "5",                             "type": "web",                             "name": "",                             "x": "0",                             "y": "9",                             "width": "6",                             "height": "4",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "4",                             "type": "problems",                             "name": "",                             "x": "0",                             "y": "3",                             "width": "12",                             "height": "6",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "3",                             "type": "favmaps",                             "name": "",                             "x": "8",                             "y": "0",                             "width": "4",                             "height": "3",                             "view_mode": "0",                             "fields": []                         },                         {                             "widgetid": "1",                             "type": "favgraphs",                             "name": "",                             "x": "0",                             "y": "0",                             "width": "4",                             "height": "3",                             "view_mode": "0",                             "fields": []                         }                     ]                 },                 {                     "dashboard_pageid": "2",                     "name": "",                     "display_period": "0",                     "widgets": []                 },                 {                     "dashboard_pageid": "3",                     "name": "Custom page name",                     "display_period": "60",                     "widgets": []                 }             ]         },         {             "dashboardid": "2",             "name": "My dashboard",             "userid": "1",             "private": "1",             "display_period": "60",             "auto_start": "1",             "users": [                 {                     "userid": "4",                     "permission": "3"                 }             ],             "userGroups": [                 {                     "usrgrpid": "7",                     "permission": "2"                 }             ],             "pages": [                 {                     "dashboard_pageid": "4",                     "name": "",                     "display_period": "0",                     "widgets": [                         {                             "widgetid": "10",                             "type": "problems",                             "name": "",                             "x": "0",                             "y": "0",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "2",                                     "name": "groupids",                                     "value": "4"                                 }                             ]                         }                     ]                 }             ]         }     ],     "id": 1 } ```

en-us	### Retrieving additional information with `docker.container_info[]`  The `docker.container_info[]` [Zabbix agent 2 item](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2) now supports the option to retrieve either partial (short) or full low-level information about a Docker container.
zh-cn	### 使用 `docker.container_info[]` 检索附加信息  `docker.container_info[]` [Zabbix agent 2 item](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2) 现在支持检索有关 Docker 容器的部分（短）或完整底层信息的选项。

en-us	#### Retrieving all services  Retrieve all data about all services and their dependencies.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "service.get",     "params": {         "output": "extend",         "selectChildren": "extend",         "selectParents": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "serviceid": "1",             "name": "Data centers",             "status": "0",             "algorithm": "1",             "showsla": "0",             "goodsla": "99.9",             "sortorder": "0",             "parents": [],             "children": [                 {                     "serviceid": "2",                     "name": "Server 1",                     "status": "0",                     "algorithm": "1",                     "showsla": "0",                     "goodsla": "99.9",                     "sortorder": "0"                 },                 {                     "serviceid": "3",                     "name": "Server 2",                     "status": "0",                     "algorithm": "1",                     "showsla": "0",                     "goodsla": "99.9",                     "sortorder": "0"                 }             ]         },         {             "serviceid": "2",             "name": "Server 1",             "status": "0",             "algorithm": "1",             "showsla": "0",             "goodsla": "99.9",             "sortorder": "0",             "parents": [                 {                     "serviceid": "1",                     "name": "Data centers",                     "status": "0",                     "algorithm": "1",                     "showsla": "0",                     "goodsla": "99.9",                     "sortorder": "0"                 }             ],             "children": []         },         {             "serviceid": "3",             "name": "Server 2",             "status": "0",             "algorithm": "1",             "showsla": "0",             "goodsla": "99.9",             "sortorder": "0",             "parents": [                 {                     "serviceid": "1",                     "name": "Data centers",                     "status": "0",                     "algorithm": "1",                     "showsla": "0",                     "goodsla": "99.9",                     "sortorder": "0"                 }             ],             "children": []         }     ],     "id": 1 } ```  
zh-cn	#### Retrieving all services 检索所有服务  Retrieve all data about all services and their dependencies. 检索有关所有服务及其依赖关系的所有数据。  Request 请求:  ``` {.java} {     "jsonrpc": "2.0",     "method": "service.get",     "params": {         "output": "extend",         "selectDependencies": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response 响应:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "serviceid": "2",             "name": "Server 1",             "status": "0",             "algorithm": "1",             "triggerid": "0",             "showsla": "1",             "goodsla": "99.9000",             "sortorder": "0",             "dependencies": []         },         {             "serviceid": "3",             "name": "Data center 1",             "status": "0",             "algorithm": "1",             "triggerid": "0",             "showsla": "1",             "goodsla": "99.9000",             "sortorder": "0",             "dependencies": [                 {                     "linkid": "11",                     "serviceupid": "3",                     "servicedownid": "2",                     "soft": "0",                     "sortorder": "0",                     "serviceid": "2"                 },                 {                     "linkid": "10",                     "serviceupid": "3",                     "servicedownid": "5",                     "soft": "0",                     "sortorder": "1",                     "serviceid": "5"                 }             ]         },         {             "serviceid": "5",             "name": "Server 2",             "status": "0",             "algorithm": "1",             "triggerid": "0",             "showsla": "1",             "goodsla": "99.9900",             "sortorder": "1",             "dependencies": []         }     ],     "id": 1 } ```  

en-us	#### Retrieving all services  Retrieve all data about all services and their dependencies.  Request:  ```json {     "jsonrpc": "2.0",     "method": "service.get",     "params": {         "output": "extend",         "selectChildren": "extend",         "selectParents": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "serviceid": "1",             "name": "My Service - 0001",             "status": "-1",             "algorithm": "2",             "sortorder": "0",             "weight": "0",             "propagation_rule": "0",             "propagation_value": "0",             "description": "My Service Description 0001.",             "uuid": "dfa4daeaea754e3a95c04d6029182681",             "created_at": "946684800",             "readonly": false,             "parents": [],             "children": []         },         {             "serviceid": "2",             "name": "My Service - 0002",             "status": "-1",             "algorithm": "2",             "sortorder": "0",             "weight": "0",             "propagation_rule": "0",             "propagation_value": "0",             "description": "My Service Description 0002.",             "uuid": "20ea0d85212841219130abeaca28c065",             "created_at": "946684800",             "readonly": false,             "parents": [],             "children": []         }     ],     "id": 1 } ```
zh-cn	#### 检索所有服务  检索所有服务和依赖的所有相关数据。  请求：  ```json {     "jsonrpc": "2.0",     "method": "service.get",     "params": {         "output": "extend",         "selectChildren": "extend",         "selectParents": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  相应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "serviceid": "1",             "name": "My Service - 0001",             "status": "-1",             "algorithm": "2",             "sortorder": "0",             "weight": "0",             "propagation_rule": "0",             "propagation_value": "0",             "description": "My Service Description 0001.",             "uuid": "dfa4daeaea754e3a95c04d6029182681",             "created_at": "946684800",             "readonly": false,             "parents": [],             "children": []         },         {             "serviceid": "2",             "name": "My Service - 0002",             "status": "-1",             "algorithm": "2",             "sortorder": "0",             "weight": "0",             "propagation_rule": "0",             "propagation_value": "0",             "description": "My Service Description 0002.",             "uuid": "20ea0d85212841219130abeaca28c065",             "created_at": "946684800",             "readonly": false,             "parents": [],             "children": []         }     ],     "id": 1 } ```

en-us	#### Retrieving all SLAs  Retrieve all data about all SLAs and their properties.  Request:  ```json {     "jsonrpc": "2.0",     "method": "sla.get",     "params": {         "output": "extend",         "selectSchedule": ["period_from", "period_to"],         "selectExcludedDowntimes": ["name", "period_from", "period_to"],         "selectServiceTags": ["tag", "operator", "value"],         "preservekeys": true     },     "auth": "85dd04b94cbfad794616eb923be13c71",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "1": {             "slaid": "1",             "name": "Database Uptime",             "period": "1",             "slo": "99.9995",             "effective_date": "1672444800",             "timezone": "America/Toronto",             "status": "1",             "description": "Provide excellent uptime for main SQL database engines.",             "service_tags": [                 {                     "tag": "Database",                     "operator": "0",                     "value": "MySQL"                 },                 {                     "tag": "Database",                     "operator": "0",                     "value": "PostgreSQL"                 }             ],             "schedule": [                 {                     "period_from": "0",                     "period_to": "601200"                 }             ],             "excluded_downtimes": [                 {                     "name": "Software version upgrade rollout",                     "period_from": "1648760400",                     "period_to": "1648764900"                 }             ]         }     },     "id": 1 } ```
zh-cn	#### 检索所有SLAs  检索有关所有 SLA 及其属性的所有数据。  请求:  ```json {     "jsonrpc": "2.0",     "method": "sla.get",     "params": {         "output": "extend",         "selectSchedule": ["period_from", "period_to"],         "selectExcludedDowntimes": ["name", "period_from", "period_to"],         "selectServiceTags": ["tag", "operator", "value"],         "preservekeys": true     },     "auth": "85dd04b94cbfad794616eb923be13c71",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "1": {             "slaid": "1",             "name": "Database Uptime",             "period": "1",             "slo": "99.9995",             "effective_date": "1672444800",             "timezone": "America/Toronto",             "status": "1",             "description": "Provide excellent uptime for main SQL database engines.",             "service_tags": [                 {                     "tag": "Database",                     "operator": "0",                     "value": "MySQL"                 },                 {                     "tag": "Database",                     "operator": "0",                     "value": "PostgreSQL"                 }             ],             "schedule": [                 {                     "period_from": "0",                     "period_to": "601200"                 }             ],             "excluded_downtimes": [                 {                     "name": "Software version upgrade rollout",                     "period_from": "1648760400",                     "period_to": "1648764900"                 }             ]         }     },     "id": 1 } ```

en-us	#### Retrieving a specific trigger prototype with tags  Request:  ```json {     "jsonrpc": "2.0",     "method": "triggerprototype.get",     "params": {         "output": [             "triggerid",             "description"         ]         "selectTags": "extend",         "triggerids": [             "17373"         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "triggerid": "17373",             "description": "Free disk space is less than 20% on volume {#FSNAME}",             "tags": [                 {                     "tag": "volume",                     "value": "{#FSNAME}"                 },                 {                     "tag": "type",                     "value": "{#FSTYPE}"                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 根据标签检索特定的触发器原型  请求:  ```json {     "jsonrpc": "2.0",     "method": "triggerprototype.get",     "params": {         "output": [             "triggerid",             "description"         ]         "selectTags": "extend",         "triggerids": [             "17373"         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "triggerid": "17373",             "description": "Free disk space is less than 20% on volume {#FSNAME}",             "tags": [                 {                     "tag": "volume",                     "value": "{#FSNAME}"                 },                 {                     "tag": "type",                     "value": "{#FSTYPE}"                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieving a specific trigger with tags  Retrieve a specific trigger with tags.  Request:  ```json {     "jsonrpc": "2.0",     "method": "trigger.get",     "params": {         "output": [             "triggerid",             "description"         ],         "selectTags": "extend",         "triggerids": [             "17578"         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "triggerid": "17370",             "description": "Service status",             "tags": [                 {                     "tag": "service",                     "value": "{{ITEM.VALUE}.regsub(\"Service (.*) has stopped\", \"\\1\")}"                 },                 {                     "tag": "error",                     "value": ""                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 使用标签检索特定的触发器.  使用标签检索特定的触发器.  请求:  ```json {     "jsonrpc": "2.0",     "method": "trigger.get",     "params": {         "output": [             "triggerid",             "description"         ],         "selectTags": "extend",         "triggerids": [             "17578"         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "triggerid": "17370",             "description": "Service status",             "tags": [                 {                     "tag": "service",                     "value": "{{ITEM.VALUE}.regsub(\"Service (.*) has stopped\", \"\\1\")}"                 },                 {                     "tag": "error",                     "value": ""                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieving a web scenario  Retrieve all data about web scenario "4".  Request:  ```json {     "jsonrpc": "2.0",     "method": "httptest.get",     "params": {         "output": "extend",         "selectSteps": "extend",         "httptestids": "9"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "httptestid": "9",             "name": "Homepage check",             "nextcheck": "0",             "delay": "1m",             "status": "0",             "variables": [],             "agent": "Zabbix",             "authentication": "0",             "http_user": "",             "http_password": "",             "hostid": "10084",             "templateid": "0",             "http_proxy": "",             "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",                     "retrieve_mode": "0",                     "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 } ```
zh-cn	#### 检索一个Web场景  检索关于Web场景“4”的所有数据。  请求：  ```json {     "jsonrpc": "2.0",     "method": "httptest.get",     "params": {         "output": "extend",         "selectSteps": "extend",         "httptestids": "9"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "httptestid": "9",             "name": "Homepage check",             "nextcheck": "0",             "delay": "1m",             "status": "0",             "variables": [],             "agent": "Zabbix",             "authentication": "0",             "http_user": "",             "http_password": "",             "hostid": "10084",             "templateid": "0",             "http_proxy": "",             "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",                     "retrieve_mode": "0",                     "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 } ```

en-us	#### Retrieving data by name  Retrieve all data about two host groups named "Zabbix servers" and "Linux servers".  Request:  ```json {     "jsonrpc": "2.0",     "method": "hostgroup.get",     "params": {         "output": "extend",         "filter": {             "name": [                 "Zabbix servers",                 "Linux servers"             ]         }     },     "auth": "6f38cddc44cfbb6c1bd186f9a220b5a0",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "groupid": "2",             "name": "Linux servers",             "internal": "0"         },         {             "groupid": "4",             "name": "Zabbix servers",             "internal": "0"         }     ],     "id": 1 } ```
zh-cn	#### 按名称检索数据  检索关于“Zabbix servers”和“Linux servers”两个主机组的所有数据。  请求:  ```json {     "jsonrpc": "2.0",     "method": "hostgroup.get",     "params": {         "output": "extend",         "filter": {             "name": [                 "Zabbix servers",                 "Linux servers"             ]         }     },     "auth": "6f38cddc44cfbb6c1bd186f9a220b5a0",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "groupid": "2",             "name": "Linux servers",             "internal": "0"         },         {             "groupid": "4",             "name": "Zabbix servers",             "internal": "0"         }     ],     "id": 1 } ```

en-us	#### Retrieving data by name  Retrieve all data about two hosts named "Zabbix server" and "Linux server".  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "filter": {             "host": [                 "Zabbix server",                 "Linux server"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "maintenances": [],             "hostid": "10160",             "proxy_hostid": "0",             "host": "Zabbix server",             "status": "0",             "lastaccess": "0",             "ipmi_authtype": "-1",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "snmp_disable_until": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "name": "Zabbix server",             "description": "The Zabbix monitoring server.",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": ""         },         {             "maintenances": [],             "hostid": "10167",             "proxy_hostid": "0",             "host": "Linux server",             "status": "0",             "lastaccess": "0",             "ipmi_authtype": "-1",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "snmp_disable_until": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "name": "Linux server",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": ""         }     ],     "id": 1 } ```
zh-cn	 #### 按名称检索数据  获取所有关于"Zabbix server"和"Linux server"两个主机的数据。  请求:  ``` {.java} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "filter": {             "host": [                 "Zabbix server",                 "Linux server"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "maintenances": [],             "hostid": "10160",             "proxy_hostid": "0",             "host": "Zabbix server",             "status": "0",             "lastaccess": "0",             "ipmi_authtype": "-1",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "snmp_disable_until": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "name": "Zabbix server",             "description": "The Zabbix monitoring server.",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": ""         },         {             "maintenances": [],             "hostid": "10167",             "proxy_hostid": "0",             "host": "Linux server",             "status": "0",             "lastaccess": "0",             "ipmi_authtype": "-1",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "snmp_disable_until": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "name": "Linux server",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": ""         }     ],     "id": 1 } ```

en-us	#### Retrieving data by name  Retrieve all data about two hosts named "Zabbix server" and "Linux server".  Request:  ```json {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "filter": {             "host": [                 "Zabbix server",                 "Linux server"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10160",             "proxy_hostid": "0",             "host": "Zabbix server",             "status": "0",             "lastaccess": "0",             "ipmi_authtype": "-1",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "name": "Zabbix server",             "flags": "0",             "description": "The Zabbix monitoring server.",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "inventory_mode": "1"         },         {             "hostid": "10167",             "proxy_hostid": "0",             "host": "Linux server",             "status": "0",             "lastaccess": "0",             "ipmi_authtype": "-1",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "name": "Linux server",             "flags": "0",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "inventory_mode": "1"         }     ],     "id": 1 } ```
zh-cn	 #### 按名称检索数据  获取所有关于"Zabbix server"和"Linux server"两个主机的数据。  请求:  ``` {.java} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "filter": {             "host": [                 "Zabbix server",                 "Linux server"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "maintenances": [],             "hostid": "10160",             "proxy_hostid": "0",             "host": "Zabbix server",             "status": "0",             "lastaccess": "0",             "ipmi_authtype": "-1",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "snmp_disable_until": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "name": "Zabbix server",             "description": "The Zabbix monitoring server.",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": ""         },         {             "maintenances": [],             "hostid": "10167",             "proxy_hostid": "0",             "host": "Linux server",             "status": "0",             "lastaccess": "0",             "ipmi_authtype": "-1",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "snmp_disable_until": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "name": "Linux server",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": ""         }     ],     "id": 1 } ```

en-us	#### Retrieving data by trigger ID  Retrieve all data and the functions used in trigger "14062".  Request:  ```json {     "jsonrpc": "2.0",     "method": "trigger.get",     "params": {         "triggerids": "14062",         "output": "extend",         "selectFunctions": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "triggerid": "14062",             "expression": "{13513}<10m",             "description": "{HOST.NAME} has been restarted (uptime < 10m)",             "url": "",             "status": "0",             "value": "0",             "priority": "2",             "lastchange": "0",             "comments": "The host uptime is less than 10 minutes",             "error": "",             "templateid": "10016",             "type": "0",             "state": "0",             "flags": "0",             "recovery_mode": "0",             "recovery_expression": "",             "correlation_mode": "0",             "correlation_tag": "",             "manual_close": "0",             "opdata": "",             "functions": [                 {                     "functionid": "13513",                     "itemid": "24350",                     "triggerid": "14062",                     "parameter": "$",                     "function": "last"                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 根据触发器ID检索数据  检索触发器"14062"中使用的所有数据和功能.  请求:  ```json {     "jsonrpc": "2.0",     "method": "trigger.get",     "params": {         "triggerids": "14062",         "output": "extend",         "selectFunctions": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "triggerid": "14062",             "expression": "{13513}<10m",             "description": "{HOST.NAME} has been restarted (uptime < 10m)",             "url": "",             "status": "0",             "value": "0",             "priority": "2",             "lastchange": "0",             "comments": "The host uptime is less than 10 minutes",             "error": "",             "templateid": "10016",             "type": "0",             "state": "0",             "flags": "0",             "recovery_mode": "0",             "recovery_expression": "",             "correlation_mode": "0",             "correlation_tag": "",             "manual_close": "0",             "opdata": "",             "functions": [                 {                     "functionid": "13513",                     "itemid": "24350",                     "triggerid": "14062",                     "parameter": "$",                     "function": "last"                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieving discovery rules from a host  Retrieve all discovery rules for specific host ID.  Request:  ```json {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": "extend",         "hostids": "10202"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "27425",             "type": "0",             "snmp_oid": "",             "hostid": "10202",             "name": "Network interface discovery",             "key_": "net.if.discovery",             "delay": "1h",             "status": "0",             "trapper_hosts": "",             "templateid": "22444",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "119",             "description": "Discovery of network interfaces as defined in global regular expression \"Network interfaces for discovery\".",             "lifetime": "30d",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": []         },         {             "itemid": "27426",             "type": "0",             "snmp_oid": "",             "hostid": "10202",             "name": "Mounted filesystem discovery",             "key_": "vfs.fs.discovery",             "delay": "1h",             "status": "0",             "trapper_hosts": "",             "templateid": "22450",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "119",             "description": "Discovery of file systems of different types as defined in global regular expression \"File systems for discovery\".",             "lifetime": "30d",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": []         }     ],     "id": 1 } ```
zh-cn	#### 检索主机自动发现规则  返回主机"10202"所有自动发现规则。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": "extend",         "hostids": "10202"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "27425",             "type": "0",             "snmp_oid": "",             "hostid": "10202",             "name": "Network interface discovery",             "key_": "net.if.discovery",             "delay": "1h",             "state": "0",             "status": "0",             "trapper_hosts": "",             "error": "",             "templateid": "22444",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "119",             "description": "Discovery of network interfaces as defined in global regular expression \"Network interfaces for discovery\".",             "lifetime": "30d",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         },         {             "itemid": "27426",             "type": "0",             "snmp_oid": "",             "hostid": "10202",             "name": "Mounted filesystem discovery",             "key_": "vfs.fs.discovery",             "delay": "1h",             "state": "0",             "status": "0",             "trapper_hosts": "",             "error": "",             "templateid": "22450",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "119",             "description": "Discovery of file systems of different types as defined in global regular expression \"File systems for discovery\".",             "lifetime": "30d",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         }     ],     "id": 1 } ```

en-us	#### Retrieving discovery rules from a host  Retrieve all discovery rules from host "10202".  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": "extend",         "hostids": "10202"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "27425",             "type": "0",             "snmp_oid": "",             "hostid": "10202",             "name": "Network interface discovery",             "key_": "net.if.discovery",             "delay": "1h",             "state": "0",             "status": "0",             "trapper_hosts": "",             "error": "",             "templateid": "22444",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "119",             "description": "Discovery of network interfaces as defined in global regular expression \"Network interfaces for discovery\".",             "lifetime": "30d",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         },         {             "itemid": "27426",             "type": "0",             "snmp_oid": "",             "hostid": "10202",             "name": "Mounted filesystem discovery",             "key_": "vfs.fs.discovery",             "delay": "1h",             "state": "0",             "status": "0",             "trapper_hosts": "",             "error": "",             "templateid": "22450",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "119",             "description": "Discovery of file systems of different types as defined in global regular expression \"File systems for discovery\".",             "lifetime": "30d",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         }     ],     "id": 1 } ```
zh-cn	#### 检索主机自动发现规则  返回主机"10202"所有自动发现规则。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": "extend",         "hostids": "10202"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "27425",             "type": "0",             "snmp_oid": "",             "hostid": "10202",             "name": "Network interface discovery",             "key_": "net.if.discovery",             "delay": "1h",             "state": "0",             "status": "0",             "trapper_hosts": "",             "error": "",             "templateid": "22444",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "119",             "description": "Discovery of network interfaces as defined in global regular expression \"Network interfaces for discovery\".",             "lifetime": "30d",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         },         {             "itemid": "27426",             "type": "0",             "snmp_oid": "",             "hostid": "10202",             "name": "Mounted filesystem discovery",             "key_": "vfs.fs.discovery",             "delay": "1h",             "state": "0",             "status": "0",             "trapper_hosts": "",             "error": "",             "templateid": "22450",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "119",             "description": "Discovery of file systems of different types as defined in global regular expression \"File systems for discovery\".",             "lifetime": "30d",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         }     ],     "id": 1 } ```

en-us	#### Retrieving enabled user groups  Retrieve all enabled user groups.  Request:  ```json {     "jsonrpc": "2.0",     "method": "usergroup.get",     "params": {         "output": "extend",         "status": 0     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "usrgrpid": "7",             "name": "Zabbix administrators",             "gui_access": "0",             "users_status": "0",             "debug_mode": "1"         },         {             "usrgrpid": "8",             "name": "Guests",             "gui_access": "0",             "users_status": "0",             "debug_mode": "0"         },         {             "usrgrpid": "11",             "name": "Enabled debug mode",             "gui_access": "0",             "users_status": "0",             "debug_mode": "1"         },         {             "usrgrpid": "12",             "name": "No access to the frontend",             "gui_access": "2",             "users_status": "0",             "debug_mode": "0"         },         {             "usrgrpid": "14",             "name": "Read only",             "gui_access": "0",             "users_status": "0",             "debug_mode": "0"         },         {             "usrgrpid": "18",             "name": "Deny",             "gui_access": "0",             "users_status": "0",             "debug_mode": "0"         }     ],     "id": 1 } ```
zh-cn	#### 查询启用的用户组  查询所有启用状态的用户组.  请求:  ```json {     "jsonrpc": "2.0",     "method": "usergroup.get",     "params": {         "output": "extend",         "status": 0     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  返回:  ```json {     "jsonrpc": "2.0",     "result": [         {             "usrgrpid": "7",             "name": "Zabbix administrators",             "gui_access": "0",             "users_status": "0",             "debug_mode": "1"         },         {             "usrgrpid": "8",             "name": "Guests",             "gui_access": "0",             "users_status": "0",             "debug_mode": "0"         },         {             "usrgrpid": "11",             "name": "Enabled debug mode",             "gui_access": "0",             "users_status": "0",             "debug_mode": "1"         },         {             "usrgrpid": "12",             "name": "No access to the frontend",             "gui_access": "2",             "users_status": "0",             "debug_mode": "0"         },         {             "usrgrpid": "14",             "name": "Read only",             "gui_access": "0",             "users_status": "0",             "debug_mode": "0"         },         {             "usrgrpid": "18",             "name": "Deny",             "gui_access": "0",             "users_status": "0",             "debug_mode": "0"         }     ],     "id": 1 } ```

en-us	#### Retrieving events by time period  Retrieve all events that have been created between October 9 and 10, 2012, in reverse chronological order.  Request:  ```json {     "jsonrpc": "2.0",     "method": "event.get",     "params": {         "output": "extend",         "time_from": "1349797228",         "time_till": "1350661228",         "sortfield": ["clock", "eventid"],         "sortorder": "desc"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "eventid": "20616",             "source": "0",             "object": "0",             "objectid": "14282",             "clock": "1350477814",             "value": "1",             "acknowledged": "0",             "ns": "0",             "name": "Less than 25% free in the history cache",             "severity": "3",             "r_eventid": "0",             "c_eventid": "0",             "correlationid": "0",             "userid": "0",             "opdata": "",             "suppressed": "0"         },         {             "eventid": "20617",             "source": "0",             "object": "0",             "objectid": "14283",             "clock": "1350477814",             "value": "0",             "acknowledged": "0",             "ns": "0",             "name": "Zabbix trapper processes more than 75% busy",             "severity": "3",             "r_eventid": "0",             "c_eventid": "0",             "correlationid": "0",             "userid": "0",             "opdata": "",             "suppressed": "0"         },         {             "eventid": "20618",             "source": "0",             "object": "0",             "objectid": "14284",             "clock": "1350477815",             "value": "1",             "acknowledged": "0",             "ns": "0",             "name": "High ICMP ping loss",             "severity": "3",             "r_eventid": "0",             "c_eventid": "0",             "correlationid": "0",             "userid": "0",             "opdata": "",             "suppressed": "0"         }     ],     "id": 1 } ```
zh-cn	#### 按时间段检索事件  按时间倒序检索在 2012 年 10 月 9 日至 10 日之间创建的所有事件。  请求：  ```json {     "jsonrpc": "2.0",     "method": "event.get",     "params": {     "output": "extend",     "time_from": "1349797228",     "time_till": "1350661228",     "sortfield": ["clock", "eventid"],     "sortorder": "desc"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [     {     "eventid": "20616",     "source": "0",     "object": "0",     "objectid": "14282",     "clock": "1350477814",     "value": "1",     "acknowledged": "0",     "ns": "0",     "name": "Less than 25% free in the history cache",     "severity": "3",     "r_eventid": "0",     "c_eventid": "0",     "correlationid": "0",     "userid": "0",     "opdata": "",     "suppressed": "0"     },     {     "eventid": "20617",     "source": "0",     "object": "0",     "objectid": "14283",     "clock": "1350477814",     "value": "0",     "acknowledged": "0",     "ns": "0",     "name": "Zabbix trapper processes more than 75% busy",     "severity": "3",     "r_eventid": "0",     "c_eventid": "0",     "correlationid": "0",     "userid": "0",     "opdata": "",     "suppressed": "0"     },     {     "eventid": "20618",     "source": "0",     "object": "0",     "objectid": "14284",     "clock": "1350477815",     "value": "1",     "acknowledged": "0",     "ns": "0",     "name": "High ICMP ping loss",     "severity": "3",     "r_eventid": "0",     "c_eventid": "0",     "correlationid": "0",     "userid": "0",     "opdata": "",     "suppressed": "0"     }     ],     "id": 1 } ```

en-us	#### Retrieving filter conditions  Retrieve the name of the LLD rule "24681" and its filter conditions. The filter uses the "and" evaluation type, so the `formula` property is empty and `eval_formula` is generated automatically.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": [             "name"         ],         "selectFilter": "extend",         "itemids": ["24681"]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "24681",             "name": "Filtered LLD rule",             "filter": {                 "evaltype": "1",                 "formula": "",                 "conditions": [                     {                         "macro": "{#MACRO1}",                         "value": "@regex1",                         "operator": "8",                         "formulaid": "A"                     },                     {                         "macro": "{#MACRO2}",                         "value": "@regex2",                         "operator": "9",                         "formulaid": "B"                     },                     {                         "macro": "{#MACRO3}",                         "value": "",                         "operator": "12",                         "formulaid": "C"                     },                     {                         "macro": "{#MACRO4}",                         "value": "",                         "operator": "13",                         "formulaid": "D"                     }                 ],                 "eval_formula": "A and B and C and D"             }         }     ],     "id": 1 } ```
zh-cn	#### 检索过滤条件  检索 LLD 规则的名称“24681”及其过滤条件。过滤器使用“and”求值类型，因此 `formula` 属性为空，并自动生成 `eval_formula`。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": [             "name"         ],         "selectFilter": "extend",         "itemids": ["24681"]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "24681",             "name": "Filtered LLD rule",             "filter": {                 "evaltype": "1",                 "formula": "",                 "conditions": [                     {                         "macro": "{#MACRO1}",                         "value": "@regex1",                         "operator": "8",                         "formulaid": "A"                     },                     {                         "macro": "{#MACRO2}",                         "value": "@regex2",                         "operator": "9",                         "formulaid": "B"                     },                     {                         "macro": "{#MACRO3}",                         "value": "",                         "operator": "12",                         "formulaid": "C"                     },                     {                         "macro": "{#MACRO4}",                         "value": "",                         "operator": "13",                         "formulaid": "D"                     }                 ],                 "eval_formula": "A and B and C and D"             }         }     ],     "id": 1 } ```

en-us	#### Retrieving filter conditions  Retrieve the name of the LLD rule "24681" and its filter conditions. The filter uses the "and" evaluation type, so the `formula` property is empty and `eval_formula` is generated automatically.  Request:  ```json {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": ["name"],         "selectFilter": "extend",         "itemids": ["24681"]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "24681",             "name": "Filtered LLD rule",             "filter": {                 "evaltype": "1",                 "formula": "",                 "conditions": [                     {                         "macro": "{#MACRO1}",                         "value": "@regex1",                         "operator": "8",                         "formulaid": "A"                     },                     {                         "macro": "{#MACRO2}",                         "value": "@regex2",                         "operator": "9",                         "formulaid": "B"                     },                     {                         "macro": "{#MACRO3}",                         "value": "",                         "operator": "12",                         "formulaid": "C"                     },                     {                         "macro": "{#MACRO4}",                         "value": "",                         "operator": "13",                         "formulaid": "D"                     }                 ],                 "eval_formula": "A and B and C and D"             }         }     ],     "id": 1 } ```
zh-cn	#### 检索过滤条件  检索 LLD 规则的名称“24681”及其过滤条件。过滤器使用“and”求值类型，因此 `formula` 属性为空，并自动生成 `eval_formula`。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "discoveryrule.get",     "params": {         "output": [             "name"         ],         "selectFilter": "extend",         "itemids": ["24681"]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "24681",             "name": "Filtered LLD rule",             "filter": {                 "evaltype": "1",                 "formula": "",                 "conditions": [                     {                         "macro": "{#MACRO1}",                         "value": "@regex1",                         "operator": "8",                         "formulaid": "A"                     },                     {                         "macro": "{#MACRO2}",                         "value": "@regex2",                         "operator": "9",                         "formulaid": "B"                     },                     {                         "macro": "{#MACRO3}",                         "value": "",                         "operator": "12",                         "formulaid": "C"                     },                     {                         "macro": "{#MACRO4}",                         "value": "",                         "operator": "13",                         "formulaid": "D"                     }                 ],                 "eval_formula": "A and B and C and D"             }         }     ],     "id": 1 } ```

en-us	#### Retrieving global macros  Retrieve all global macros.  Request:  ```json {     "jsonrpc": "2.0",     "method": "usermacro.get",     "params": {         "output": "extend",         "globalmacro": true     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "globalmacroid": "6",             "macro": "{$SNMP_COMMUNITY}",             "value": "public",             "description": "",             "type": "0"         }     ],     "id": 1 } ```
zh-cn	#### 查询全局宏  查询所有的全局宏.  请求:  ```json {     "jsonrpc": "2.0",     "method": "usermacro.get",     "params": {         "output": "extend",         "globalmacro": true     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  返回:  ```json {     "jsonrpc": "2.0",     "result": [         {             "globalmacroid": "6",             "macro": "{$SNMP_COMMUNITY}",             "value": "public",             "description": "",             "type": "0"         }     ],     "id": 1 } ```

en-us	#### Retrieving global regular expressions.  Request:  ```json {     "jsonrpc": "2.0",     "method": "regexp.get",     "params": {         "output": ["regexpid", "name"],         "selectExpressions": ["expression", "expression_type"],         "regexpids": [1, 2],         "preservekeys": true     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {   "jsonrpc": "2.0",   "result": {     "1": {       "regexpid": "1",       "name": "File systems for discovery",       "expressions": [         {           "expression": "^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$",           "expression_type": "3"         }       ]     },     "2": {       "regexpid": "2",       "name": "Network interfaces for discovery",       "expressions": [         {           "expression": "^Software Loopback Interface",           "expression_type": "4"         },         {           "expression": "^(In)?[Ll]oop[Bb]ack[0-9._]*$",           "expression_type": "4"         },         {           "expression": "^NULL[0-9.]*$",           "expression_type": "4"         },         {           "expression": "^[Ll]o[0-9.]*$",           "expression_type": "4"         },         {           "expression": "^[Ss]ystem$",           "expression_type": "4"         },         {           "expression": "^Nu[0-9.]*$",           "expression_type": "4"         }       ]     }   },   "id": 1 } ```
zh-cn	#### 检索全局正则表达式。  请求：  ```json {     "jsonrpc": "2.0",     "method": "regexp.get",     "params": {         "output": ["regexpid", "name"],         "selectExpressions": ["expression", "expression_type"],         "regexpids": [1, 2],         "preservekeys": true     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {   "jsonrpc": "2.0",   "result": {     "1": {       "regexpid": "1",       "name": "File systems for discovery",       "expressions": [         {           "expression": "^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$",           "expression_type": "3"         }       ]     },     "2": {       "regexpid": "2",       "name": "Network interfaces for discovery",       "expressions": [         {           "expression": "^Software Loopback Interface",           "expression_type": "4"         },         {           "expression": "^(In)?[Ll]oop[Bb]ack[0-9._]*$",           "expression_type": "4"         },         {           "expression": "^NULL[0-9.]*$",           "expression_type": "4"         },         {           "expression": "^[Ll]o[0-9.]*$",           "expression_type": "4"         },         {           "expression": "^[Ss]ystem$",           "expression_type": "4"         },         {           "expression": "^Nu[0-9.]*$",           "expression_type": "4"         }       ]     }   },   "id": 1 } ```

en-us	#### Retrieving graph prototypes from a LLD rule  Retrieve all graph prototypes from an LLD rule.  Request:  ```json {     "jsonrpc": "2.0",     "method": "graphprototype.get",     "params": {         "output": "extend",         "discoveryids": "27426"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "graphid": "1017",             "parent_itemid": "27426",             "name": "Disk space usage {#FSNAME}",             "width": "600",             "height": "340",             "yaxismin": "0.0000",             "yaxismax": "0.0000",             "templateid": "442",             "show_work_period": "0",             "show_triggers": "0",             "graphtype": "2",             "show_legend": "1",             "show_3d": "1",             "percent_left": "0.0000",             "percent_right": "0.0000",             "ymin_type": "0",             "ymax_type": "0",             "ymin_itemid": "0",             "ymax_itemid": "0",             "discover": "0"         }     ],     "id": 1 } ```
zh-cn	#### 从 LLD 规则中检索图表原型  从一个 LLD 规则中检索所有的图表原型。  请求： ```json {     "jsonrpc": "2.0",     "method": "graphprototype.get",     "params": {         "output": "extend",         "discoveryids": "27426"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应： ```json {     "jsonrpc": "2.0",     "result": [         {             "graphid": "1017",             "parent_itemid": "27426",             "name": "Disk space usage {#FSNAME}",             "width": "600",             "height": "340",             "yaxismin": "0.0000",             "yaxismax": "0.0000",             "templateid": "442",             "show_work_period": "0",             "show_triggers": "0",             "graphtype": "2",             "show_legend": "1",             "show_3d": "1",             "percent_left": "0.0000",             "percent_right": "0.0000",             "ymin_type": "0",             "ymax_type": "0",             "ymin_itemid": "0",             "ymax_itemid": "0",             "discover": "0"         }     ],     "id": 1 } ```

en-us	#### Retrieving graphs from hosts  Retrieve all graphs from host "10107" and sort them by name.  Request:  ```json {     "jsonrpc": "2.0",     "method": "graph.get",     "params": {         "output": "extend",         "hostids": 10107,         "sortfield": "name"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "graphid": "612",             "name": "CPU jumps",             "width": "900",             "height": "200",             "yaxismin": "0",             "yaxismax": "100",             "templateid": "439",             "show_work_period": "1",             "show_triggers": "1",             "graphtype": "0",             "show_legend": "1",             "show_3d": "0",             "percent_left": "0",             "percent_right": "0",             "ymin_type": "0",             "ymax_type": "0",             "ymin_itemid": "0",             "ymax_itemid": "0",             "flags": "0"         },         {             "graphid": "613",             "name": "CPU load",             "width": "900",             "height": "200",             "yaxismin": "0",             "yaxismax": "100",             "templateid": "433",             "show_work_period": "1",             "show_triggers": "1",             "graphtype": "0",             "show_legend": "1",             "show_3d": "0",             "percent_left": "0",             "percent_right": "0",             "ymin_type": "1",             "ymax_type": "0",             "ymin_itemid": "0",             "ymax_itemid": "0",             "flags": "0"         },         {             "graphid": "614",             "name": "CPU utilization",             "width": "900",             "height": "200",             "yaxismin": "0",             "yaxismax": "100",             "templateid": "387",             "show_work_period": "1",             "show_triggers": "0",             "graphtype": "1",             "show_legend": "1",             "show_3d": "0",             "percent_left": "0",             "percent_right": "0",             "ymin_type": "1",             "ymax_type": "1",             "ymin_itemid": "0",             "ymax_itemid": "0",             "flags": "0"         },         {             "graphid": "645",             "name": "Disk space usage /",             "width": "600",             "height": "340",             "yaxismin": "0",             "yaxismax": "0",             "templateid": "0",             "show_work_period": "0",             "show_triggers": "0",             "graphtype": "2",             "show_legend": "1",             "show_3d": "1",             "percent_left": "0",             "percent_right": "0",             "ymin_type": "0",             "ymax_type": "0",             "ymin_itemid": "0",             "ymax_itemid": "0",             "flags": "4"         }     ],     "id": 1 } ```
zh-cn	#### 从主机上检索图表  检索主机 "10107 "的所有图表，并按名称排序。  请求：  ```json {     "jsonrpc": "2.0",     "method": "graph.get",     "params": {         "output": "extend",         "hostids": 10107,         "sortfield": "name"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "graphid": "612",             "name": "CPU jumps",             "width": "900",             "height": "200",             "yaxismin": "0",             "yaxismax": "100",             "templateid": "439",             "show_work_period": "1",             "show_triggers": "1",             "graphtype": "0",             "show_legend": "1",             "show_3d": "0",             "percent_left": "0",             "percent_right": "0",             "ymin_type": "0",             "ymax_type": "0",             "ymin_itemid": "0",             "ymax_itemid": "0",             "flags": "0"         },         {             "graphid": "613",             "name": "CPU load",             "width": "900",             "height": "200",             "yaxismin": "0",             "yaxismax": "100",             "templateid": "433",             "show_work_period": "1",             "show_triggers": "1",             "graphtype": "0",             "show_legend": "1",             "show_3d": "0",             "percent_left": "0",             "percent_right": "0",             "ymin_type": "1",             "ymax_type": "0",             "ymin_itemid": "0",             "ymax_itemid": "0",             "flags": "0"         },         {             "graphid": "614",             "name": "CPU utilization",             "width": "900",             "height": "200",             "yaxismin": "0",             "yaxismax": "100",             "templateid": "387",             "show_work_period": "1",             "show_triggers": "0",             "graphtype": "1",             "show_legend": "1",             "show_3d": "0",             "percent_left": "0",             "percent_right": "0",             "ymin_type": "1",             "ymax_type": "1",             "ymin_itemid": "0",             "ymax_itemid": "0",             "flags": "0"         },         {             "graphid": "645",             "name": "Disk space usage /",             "width": "600",             "height": "340",             "yaxismin": "0",             "yaxismax": "0",             "templateid": "0",             "show_work_period": "0",             "show_triggers": "0",             "graphtype": "2",             "show_legend": "1",             "show_3d": "1",             "percent_left": "0",             "percent_right": "0",             "ymin_type": "0",             "ymax_type": "0",             "ymin_itemid": "0",             "ymax_itemid": "0",             "flags": "4"         }     ],     "id": 1 } ```

en-us	#### Retrieving host groups  Retrieve names of the groups host "Zabbix server" is member of, but no host details themselves.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": ["hostid"],         "selectGroups": "extend",         "filter": {             "host": [                 "Zabbix server"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 2 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10085",             "groups": [                 {                     "groupid": "2",                     "name": "Linux servers",                     "internal": "0",                     "flags": "0"                 },                 {                     "groupid": "4",                     "name": "Zabbix servers",                     "internal": "0",                     "flags": "0"                 }             ]         }     ],     "id": 2 } ```
zh-cn	 #### 获取主机组  获取主机"Zabbix server"所属的主机组，并不检索主机本身的详细信息。  请求:  ``` {.java} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": ["hostid"],         "selectGroups": "extend",         "filter": {             "host": [                 "Zabbix server"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 2 } ```  响应:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10085",             "groups": [                 {                     "groupid": "2",                     "name": "Linux servers",                     "internal": "0",                     "flags": "0"                 },                 {                     "groupid": "4",                     "name": "Zabbix servers",                     "internal": "0",                     "flags": "0"                 }             ]         }     ],     "id": 2 } ```

en-us	#### Retrieving host groups  Retrieve names of the groups host "Zabbix server" is member of, but no host details themselves.  Request:  ```json {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": ["hostid"],         "selectGroups": "extend",         "filter": {             "host": [                 "Zabbix server"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 2 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10085",             "groups": [                 {                     "groupid": "2",                     "name": "Linux servers",                     "internal": "0",                     "flags": "0"                 },                 {                     "groupid": "4",                     "name": "Zabbix servers",                     "internal": "0",                     "flags": "0"                 }             ]         }     ],     "id": 2 } ```
zh-cn	 #### 获取主机组  获取主机"Zabbix server"所属的主机组，并不检索主机本身的详细信息。  请求:  ``` {.java} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": ["hostid"],         "selectGroups": "extend",         "filter": {             "host": [                 "Zabbix server"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 2 } ```  响应:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10085",             "groups": [                 {                     "groupid": "2",                     "name": "Linux servers",                     "internal": "0",                     "flags": "0"                 },                 {                     "groupid": "4",                     "name": "Zabbix servers",                     "internal": "0",                     "flags": "0"                 }             ]         }     ],     "id": 2 } ```

en-us	#### Retrieving host macros for a host  Retrieve all host macros defined for host "10198".  Request:  ```json {     "jsonrpc": "2.0",     "method": "usermacro.get",     "params": {         "output": "extend",         "hostids": "10198"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "hostmacroid": "9",             "hostid": "10198",             "macro": "{$INTERFACE}",             "value": "eth0",             "description": "",             "type": "0"         },         {             "hostmacroid": "11",             "hostid": "10198",             "macro": "{$SNMP_COMMUNITY}",             "value": "public",             "description": "",             "type": "0"         }     ],     "id": 1 } ```
zh-cn	#### 查询一个主机的主机宏  查询主机"10198"所有的主机宏.  请求:  ```json {     "jsonrpc": "2.0",     "method": "usermacro.get",     "params": {         "output": "extend",         "hostids": "10198"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  返回:  ```json {     "jsonrpc": "2.0",     "result": [         {             "hostmacroid": "9",             "hostid": "10198",             "macro": "{$INTERFACE}",             "value": "eth0",             "description": "",             "type": "0"         },         {             "hostmacroid": "11",             "hostid": "10198",             "macro": "{$SNMP_COMMUNITY}",             "value": "public",             "description": "",             "type": "0"         }     ],     "id": 1 } ```

en-us	#### Retrieving host prototypes from an LLD rule  Retrieve all host prototypes, their group links, group prototypes and tags from an LLD rule.  Request:  ```json {     "jsonrpc": "2.0",     "method": "hostprototype.get",     "params": {         "output": "extend",         "selectInterfaces": "extend",         "selectGroupLinks": "extend",         "selectGroupPrototypes": "extend",         "selectTags": "extend",         "discoveryids": "23554"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10092",             "host": "{#HV.UUID}",             "name": "{#HV.UUID}",             "status": "0",             "templateid": "0",             "discover": "0",             "custom_interfaces": "1",             "inventory_mode": "-1",             "groupLinks": [                 {                     "group_prototypeid": "4",                     "hostid": "10092",                     "groupid": "7",                     "templateid": "0"                 }             ],             "groupPrototypes": [                 {                     "group_prototypeid": "7",                     "hostid": "10092",                     "name": "{#CLUSTER.NAME}",                     "templateid": "0"                 }             ],             "tags": [                 {                     "tag": "Datacenter",                     "value": "{#DATACENTER.NAME}"                 },                 {                     "tag": "Instance type",                     "value": "{#INSTANCE_TYPE}"                 }             ],             "interfaces": [                 {                     "main": "1",                     "type": "2",                     "useip": "1",                     "ip": "127.0.0.1",                     "dns": "",                     "port": "161",                     "details": {                         "version": "2",                         "bulk": "1",                         "community": "{$SNMP_COMMUNITY}"                     }                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 从LLD规则中获取主机原型  从LLD规则中获取所有主机原型，组链接，组原型和标签  请求:  ```json {     "jsonrpc": "2.0",     "method": "hostprototype.get",     "params": {         "output": "extend",         "selectInterfaces": "extend",         "selectGroupLinks": "extend",         "selectGroupPrototypes": "extend",         "selectTags": "extend",         "discoveryids": "23554"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10092",             "host": "{#HV.UUID}",             "name": "{#HV.UUID}",             "status": "0",             "templateid": "0",             "discover": "0",             "custom_interfaces": "1",             "inventory_mode": "-1",             "groupLinks": [                 {                     "group_prototypeid": "4",                     "hostid": "10092",                     "groupid": "7",                     "templateid": "0"                 }             ],             "groupPrototypes": [                 {                     "group_prototypeid": "7",                     "hostid": "10092",                     "name": "{#CLUSTER.NAME}",                     "templateid": "0"                 }             ],             "tags": [                 {                     "tag": "Datacenter",                     "value": "{#DATACENTER.NAME}"                 },                 {                     "tag": "Instance type",                     "value": "{#INSTANCE_TYPE}"                 }             ],             "interfaces": [                 {                     "main": "1",                     "type": "2",                     "useip": "1",                     "ip": "127.0.0.1",                     "dns": "",                     "port": "161",                     "details": {                         "version": "2",                         "bulk": "1",                         "community": "{$SNMP_COMMUNITY}"                     }                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieving hosts  We now have a valid user authentication token that can be used to access the data in Zabbix. For example, let's use the [host.get](/manual/api/reference/host/get) method to retrieve the IDs, host names and interfaces of all configured [hosts](/manual/api/reference/host/object):  ```json {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": [             "hostid",             "host"         ],         "selectInterfaces": [             "interfaceid",             "ip"         ]     },     "id": 2,     "auth": "0424bd59b807674191e7d77572075f33" } ```  ::: noteimportant Note that the `auth` property is now set to the authentication token we've obtained by calling `user.login`. :::  The response object will contain the requested data about the hosts:  ```json {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10084",             "host": "Zabbix server",             "interfaces": [                 {                     "interfaceid": "1",                     "ip": "127.0.0.1"                 }             ]         }     ],     "id": 2 } ```  ::: notetip For performance reasons we recommend to always list the object properties you want to retrieve and avoid retrieving everything. :::
zh-cn	#### 检索主机  我们现在有一个有效的用户身份认证 token，可以用来访问 Zabbix 中的数据。例如，我们使用 [host.get](/manual/api/reference/host/get) 方法检索所有已配置 [主机](/manual/api/reference/host/object) 的ID，主机名和接口 ：  ``` {.json} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": [             "hostid",             "host"         ],         "selectInterfaces": [             "interfaceid",             "ip"         ]     },     "id": 2,     "auth": "0424bd59b807674191e7d77572075f33" } ```  ::: noteimportant 请注意 `auth`属性现在设置为我们通过调用 `user.login` 方法获得的身份认证 token。 :::  响应对象将包含有关主机的请求数据：  ``` {.json} {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10084",             "host": "Zabbix server",             "interfaces": [                 {                     "interfaceid": "1",                     "ip": "127.0.0.1"                 }             ]         }     ],     "id": 2 } ```  ::: notetip 出于性能原因，我们建议始终列出要检索的对象属性，并避免检索所有内容。 :::

en-us	#### Retrieving item history data  Return 10 latest values received from a numeric(float) item.  Request:  ```json {     "jsonrpc": "2.0",     "method": "history.get",     "params": {         "output": "extend",         "history": 0,         "itemids": "23296",         "sortfield": "clock",         "sortorder": "DESC",         "limit": 10     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "23296",             "clock": "1351090996",             "value": "0.085",             "ns": "563157632"         },         {             "itemid": "23296",             "clock": "1351090936",             "value": "0.16",             "ns": "549216402"         },         {             "itemid": "23296",             "clock": "1351090876",             "value": "0.18",             "ns": "537418114"         },         {             "itemid": "23296",             "clock": "1351090816",             "value": "0.21",             "ns": "522659528"         },         {             "itemid": "23296",             "clock": "1351090756",             "value": "0.215",             "ns": "507809457"         },         {             "itemid": "23296",             "clock": "1351090696",             "value": "0.255",             "ns": "495509699"         },         {             "itemid": "23296",             "clock": "1351090636",             "value": "0.36",             "ns": "477708209"         },         {             "itemid": "23296",             "clock": "1351090576",             "value": "0.375",             "ns": "463251343"         },         {             "itemid": "23296",             "clock": "1351090516",             "value": "0.315",             "ns": "447947017"         },         {             "itemid": "23296",             "clock": "1351090456",             "value": "0.275",             "ns": "435307141"         }     ],     "id": 1 } ```
zh-cn	#### 检索监控项的历史数据  返回从一个 `numeric(float)` 监控项收到的10个最新值。  请求： ```json {     "jsonrpc": "2.0",     "method": "history.get",     "params": {         "output": "extend",         "history": 0,         "itemids": "23296",         "sortfield": "clock",         "sortorder": "DESC",         "limit": 10     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应： ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "23296",             "clock": "1351090996",             "value": "0.085",             "ns": "563157632"         },         {             "itemid": "23296",             "clock": "1351090936",             "value": "0.16",             "ns": "549216402"         },         {             "itemid": "23296",             "clock": "1351090876",             "value": "0.18",             "ns": "537418114"         },         {             "itemid": "23296",             "clock": "1351090816",             "value": "0.21",             "ns": "522659528"         },         {             "itemid": "23296",             "clock": "1351090756",             "value": "0.215",             "ns": "507809457"         },         {             "itemid": "23296",             "clock": "1351090696",             "value": "0.255",             "ns": "495509699"         },         {             "itemid": "23296",             "clock": "1351090636",             "value": "0.36",             "ns": "477708209"         },         {             "itemid": "23296",             "clock": "1351090576",             "value": "0.375",             "ns": "463251343"         },         {             "itemid": "23296",             "clock": "1351090516",             "value": "0.315",             "ns": "447947017"         },         {             "itemid": "23296",             "clock": "1351090456",             "value": "0.275",             "ns": "435307141"         }     ],     "id": 1 } ```

en-us	#### Retrieving item prototypes from an LLD rule  Retrieve all item prototypes for specific LLD rule ID.  Request:  ```json {     "jsonrpc": "2.0",     "method": "itemprototype.get",     "params": {         "output": "extend",         "discoveryids": "27426"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "23077",             "type": "0",             "snmp_oid": "",             "hostid": "10079",             "name": "Incoming network traffic on en0",             "key_": "net.if.in[en0]",             "delay": "1m",             "history": "1w",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "bps",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "0",             "description": "",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "discover": "0",             "uuid": "",             "parameters": []         },         {             "itemid": "10010",             "type": "0",             "snmp_oid": "",             "hostid": "10001",             "name": "Processor load (1 min average per core)",             "key_": "system.cpu.load[percpu,avg1]",             "delay": "1m",             "history": "1w",             "trends": "365d",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "0",             "description": "The processor load is calculated as system CPU load divided by number of CPU cores.",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "discover": "0",             "uuid": "",             "parameters": []         }     ],     "id": 1 } ```
zh-cn	#### 返回低级别规则发现的监控项原型  返回所有低级别规则发现的监控项原型。  请求:  ``` {.java} {  · "jsonrpc": "2.0",  · "method": "itemprototype.get",  · "params": {  · "output": "extend",  · "discoveryids": "27426"  · },  · "auth": "038e1d7b1735c6a5436ee9eae095879e",  · "id": 1 } ```  返回:  ``` {.java} {  · "jsonrpc": "2.0",  · "result": [  · {  · "itemid": "23077",  · "type": "0",  · "snmp_oid": "",  · "hostid": "10079",  · "name": "Incoming network traffic on en0",  · "key_": "net.if.in[en0]",  · "delay": "1m",  · "history": "1w",  · "trends": "365d",  · "status": "0",  · "value_type": "3",  · "trapper_hosts": "",  · "units": "bps",  · "formula": "",  · "error": "",  · "logtimefmt": "",  · "templateid": "0",  · "valuemapid": "0",  · "params": "",  · "ipmi_sensor": "",  · "authtype": "0",  · "username": "",  · "password": "",  · "publickey": "",  · "privatekey": "",  · "flags": "0",  · "interfaceid": "0",  · "description": "",  · "inventory_link": "0",  · "lifetime": "30d",  · "state": "0",  · "evaltype": "0",  · "jmx_endpoint": "",  · "master_itemid": "0",  · "timeout": "3s",  · "url": "",  · "query_fields": [],  · "posts": "",  · "status_codes": "200",  · "follow_redirects": "1",  · "post_type": "0",  · "http_proxy": "",  · "headers": [],  · "retrieve_mode": "0",  · "request_method": "0",  · "output_format": "0",  · "ssl_cert_file": "",  · "ssl_key_file": "",  · "ssl_key_password": "",  · "verify_peer": "0",  · "verify_host": "0",  · "allow_traps": "0",  · "lastclock": "0",  · "lastns": "0",  · "lastvalue": "0",  · "prevvalue": "0",  · "discover": "0",  · "parameters": []  · },  · {  · "itemid": "10010",  · "type": "0",  · "snmp_oid": "",  · "hostid": "10001",  · "name": "Processor load (1 min average per core)",  · "key_": "system.cpu.load[percpu,avg1]",  · "delay": "1m",  · "history": "1w",  · "trends": "365d",  · "status": "0",  · "value_type": "0",  · "trapper_hosts": "",  · "units": "",  · "formula": "",  · "error": "",  · "logtimefmt": "",  · "templateid": "0",  · "valuemapid": "0",  · "params": "",  · "ipmi_sensor": "",  · "authtype": "0",  · "username": "",  · "password": "",  · "publickey": "",  · "privatekey": "",  · "flags": "0",  · "interfaceid": "0",  · "description": "The processor load is calculated as system CPU load divided by number of CPU cores.",  · "inventory_link": "0",  · "lifetime": "0",  · "state": "0",  · "evaltype": "0",  · "jmx_endpoint": "",  · "master_itemid": "0",  · "timeout": "3s",  · "url": "",  · "query_fields": [],  · "posts": "",  · "status_codes": "200",  · "follow_redirects": "1",  · "post_type": "0",  · "http_proxy": "",  · "headers": [],  · "retrieve_mode": "0",  · "request_method": "0",  · "output_format": "0",  · "ssl_cert_file": "",  · "ssl_key_file": "",  · "ssl_key_password": "",  · "verify_peer": "0",  · "verify_host": "0",  · "allow_traps": "0",  · "lastclock": "0",  · "lastns": "0",  · "lastvalue": "0",  · "prevvalue": "0",  · "discover": "0",  · "parameters": []  · }  · ],  · "id": 1 } ```

en-us	#### Retrieving item prototypes from an LLD rule  Retrieve all item prototypes from an LLD rule.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "itemprototype.get",     "params": {         "output": "extend",         "discoveryids": "27426"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "23077",             "type": "0",             "snmp_oid": "",             "hostid": "10079",             "name": "Incoming network traffic on en0",             "key_": "net.if.in[en0]",             "delay": "1m",             "history": "1w",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "bps",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "discover": "0",             "parameters": []         },         {             "itemid": "10010",             "type": "0",             "snmp_oid": "",             "hostid": "10001",             "name": "Processor load (1 min average per core)",             "key_": "system.cpu.load[percpu,avg1]",             "delay": "1m",             "history": "1w",             "trends": "365d",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "The processor load is calculated as system CPU load divided by number of CPU cores.",             "inventory_link": "0",             "lifetime": "0",             "state": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "discover": "0",             "parameters": []         }     ],     "id": 1 } ```
zh-cn	#### 返回低级别规则发现的监控项原型  返回所有低级别规则发现的监控项原型。  请求:  ``` {.java} {  · "jsonrpc": "2.0",  · "method": "itemprototype.get",  · "params": {  · "output": "extend",  · "discoveryids": "27426"  · },  · "auth": "038e1d7b1735c6a5436ee9eae095879e",  · "id": 1 } ```  返回:  ``` {.java} {  · "jsonrpc": "2.0",  · "result": [  · {  · "itemid": "23077",  · "type": "0",  · "snmp_oid": "",  · "hostid": "10079",  · "name": "Incoming network traffic on en0",  · "key_": "net.if.in[en0]",  · "delay": "1m",  · "history": "1w",  · "trends": "365d",  · "status": "0",  · "value_type": "3",  · "trapper_hosts": "",  · "units": "bps",  · "formula": "",  · "error": "",  · "logtimefmt": "",  · "templateid": "0",  · "valuemapid": "0",  · "params": "",  · "ipmi_sensor": "",  · "authtype": "0",  · "username": "",  · "password": "",  · "publickey": "",  · "privatekey": "",  · "flags": "0",  · "interfaceid": "0",  · "description": "",  · "inventory_link": "0",  · "lifetime": "30d",  · "state": "0",  · "evaltype": "0",  · "jmx_endpoint": "",  · "master_itemid": "0",  · "timeout": "3s",  · "url": "",  · "query_fields": [],  · "posts": "",  · "status_codes": "200",  · "follow_redirects": "1",  · "post_type": "0",  · "http_proxy": "",  · "headers": [],  · "retrieve_mode": "0",  · "request_method": "0",  · "output_format": "0",  · "ssl_cert_file": "",  · "ssl_key_file": "",  · "ssl_key_password": "",  · "verify_peer": "0",  · "verify_host": "0",  · "allow_traps": "0",  · "lastclock": "0",  · "lastns": "0",  · "lastvalue": "0",  · "prevvalue": "0",  · "discover": "0",  · "parameters": []  · },  · {  · "itemid": "10010",  · "type": "0",  · "snmp_oid": "",  · "hostid": "10001",  · "name": "Processor load (1 min average per core)",  · "key_": "system.cpu.load[percpu,avg1]",  · "delay": "1m",  · "history": "1w",  · "trends": "365d",  · "status": "0",  · "value_type": "0",  · "trapper_hosts": "",  · "units": "",  · "formula": "",  · "error": "",  · "logtimefmt": "",  · "templateid": "0",  · "valuemapid": "0",  · "params": "",  · "ipmi_sensor": "",  · "authtype": "0",  · "username": "",  · "password": "",  · "publickey": "",  · "privatekey": "",  · "flags": "0",  · "interfaceid": "0",  · "description": "The processor load is calculated as system CPU load divided by number of CPU cores.",  · "inventory_link": "0",  · "lifetime": "0",  · "state": "0",  · "evaltype": "0",  · "jmx_endpoint": "",  · "master_itemid": "0",  · "timeout": "3s",  · "url": "",  · "query_fields": [],  · "posts": "",  · "status_codes": "200",  · "follow_redirects": "1",  · "post_type": "0",  · "http_proxy": "",  · "headers": [],  · "retrieve_mode": "0",  · "request_method": "0",  · "output_format": "0",  · "ssl_cert_file": "",  · "ssl_key_file": "",  · "ssl_key_password": "",  · "verify_peer": "0",  · "verify_host": "0",  · "allow_traps": "0",  · "lastclock": "0",  · "lastns": "0",  · "lastvalue": "0",  · "prevvalue": "0",  · "discover": "0",  · "parameters": []  · }  · ],  · "id": 1 } ```

en-us	#### Retrieving items with preprocessing rules  Reatrieve all items and their preprocessing rules from host with ID "10254".  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": ["itemid", "name", "key_"],         "selectPreprocessing": "extend",         "hostids": "10254"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": {         "itemid": "23865",         "name": "http agent example JSON",         "key_": "json",         "preprocessing": [             {                 "type": "12",                 "params": "$.random",                 "error_handler": "1",                 "error_handler_params": ""             }         ]     },     "id": 1 } ```
zh-cn	#### 检索预处理规则监控项  检索 ID 为 “10254” 的主机所有监控项及其预处理规则。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": ["itemid", "name", "key_"],         "selectPreprocessing": "extend",         "hostids": "10254"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": {         "itemid": "23865",         "name": "http agent example JSON",         "key_": "json",         "preprocessing": [             {                 "type": "12",                 "params": "$.random",                 "error_handler": "1",                 "error_handler_params": ""             }         ]     },     "id": 1 } ```

en-us	#### Retrieving items with preprocessing rules  Retrieve all items and their preprocessing rules for specific host ID.  Request:  ```json {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": ["itemid", "name", "key_"],         "selectPreprocessing": "extend",         "hostids": "10254"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "itemid": "23865",         "name": "HTTP agent example JSON",         "key_": "json",         "preprocessing": [             {                 "type": "12",                 "params": "$.random",                 "error_handler": "1",                 "error_handler_params": ""             }         ]     },     "id": 1 } ```
zh-cn	#### 检索预处理规则监控项  检索 ID 为 “10254” 的主机所有监控项及其预处理规则。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": ["itemid", "name", "key_"],         "selectPreprocessing": "extend",         "hostids": "10254"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": {         "itemid": "23865",         "name": "http agent example JSON",         "key_": "json",         "preprocessing": [             {                 "type": "12",                 "params": "$.random",                 "error_handler": "1",                 "error_handler_params": ""             }         ]     },     "id": 1 } ```

en-us	#### Retrieving item trend data  Request:  ```json {     "jsonrpc": "2.0",     "method": "trend.get",     "params": {         "output": [             "itemid",             "clock",             "num",             "value_min",             "value_avg",             "value_max",         ],         "itemids": [             "23715"         ],         "limit": "1"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "23715",             "clock": "1446199200",             "num": "60",             "value_min": "0.165",             "value_avg": "0.2168",             "value_max": "0.35",         }     ],     "id": 1 } ```
zh-cn	#### 检索监控项趋势数据  请求:  ```json {     "jsonrpc": "2.0",     "method": "trend.get",     "params": {         "output": [             "itemid",             "clock",             "num",             "value_min",             "value_avg",             "value_max",         ],         "itemids": [             "23715"         ],         "limit": "1"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "23715",             "clock": "1446199200",             "num": "60",             "value_min": "0.165",             "value_avg": "0.2168",             "value_max": "0.35",         }     ],     "id": 1 } ```

en-us	#### Retrieving linked templates  Retrieve the IDs and names of templates linked to host "10084".  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": ["hostid"],         "selectParentTemplates": [             "templateid",             "name"         ],         "hostids": "10084"     },     "id": 1,     "auth": "70785d2b494a7302309b48afcdb3a401" } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10084",             "parentTemplates": [                 {                     "name": "Linux",                     "templateid": "10001"                 },                 {                     "name": "Zabbix Server",                     "templateid": "10047"                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 获取关联的模板  获取主机"10084"关联的模板的ID和名称。  请求:  ``` {.java} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": ["hostid"],         "selectParentTemplates": [             "templateid",             "name"         ],         "hostids": "10084"     },     "id": 1,     "auth": "70785d2b494a7302309b48afcdb3a401" } ```  响应:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10084",             "parentTemplates": [                 {                     "name": "Linux",                     "templateid": "10001"                 },                 {                     "name": "Zabbix Server",                     "templateid": "10047"                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieving linked templates  Retrieve the IDs and names of templates linked to host "10084".  Request:  ```json {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": ["hostid"],         "selectParentTemplates": [             "templateid",             "name"         ],         "hostids": "10084"     },     "id": 1,     "auth": "70785d2b494a7302309b48afcdb3a401" } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10084",             "parentTemplates": [                 {                     "name": "Linux",                     "templateid": "10001"                 },                 {                     "name": "Zabbix Server",                     "templateid": "10047"                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 获取关联的模板  获取主机"10084"关联的模板的ID和名称。  请求:  ``` {.java} {     "jsonrpc": "2.0",     "method": "host.get",     "params": {         "output": ["hostid"],         "selectParentTemplates": [             "templateid",             "name"         ],         "hostids": "10084"     },     "id": 1,     "auth": "70785d2b494a7302309b48afcdb3a401" } ```  响应:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "hostid": "10084",             "parentTemplates": [                 {                     "name": "Linux",                     "templateid": "10001"                 },                 {                     "name": "Zabbix Server",                     "templateid": "10047"                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieving maintenances  Retrieve all configured maintenances, and the data about the assigned host groups, defined time periods and problem tags.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "maintenance.get",     "params": {         "output": "extend",         "selectGroups": "extend",         "selectTimeperiods": "extend",         "selectTags": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "maintenanceid": "3",             "name": "Sunday maintenance",             "maintenance_type": "0",             "description": "",             "active_since": "1358844540",             "active_till": "1390466940",             "tags_evaltype": "0",             "groups": [                 {                     "groupid": "4",                     "name": "Zabbix servers",                     "internal": "0"                 }             ],             "timeperiods": [                 {                     "timeperiodid": "4",                     "timeperiod_type": "3",                     "every": "1",                     "month": "0",                     "dayofweek": "1",                     "day": "0",                     "start_time": "64800",                     "period": "3600",                     "start_date": "2147483647"                 }             ],             "tags": [                 {                     "tag": "service",                     "operator": "0",                     "value": "mysqld",                 },                 {                     "tag": "error",                     "operator": "2",                     "value": ""                 }             ]         }     ],     "id": 1 } ```  
zh-cn	#### Retrieving maintenances 获取维护模式  Retrieve all configured maintenances, and the data about the assigned host groups, hosts and defined time periods. 获取所有配置的维护模式，以及关于指定主机组、主机和定义的时间周期数据。  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "maintenance.get",     "params": {         "output": "extend",         "selectGroups": "extend",         "selectTimeperiods": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "maintenanceid": "3",             "name": "Sunday maintenance",             "maintenance_type": "0",             "description": "",             "active_since": "1358844540",             "active_till": "1390466940",             "groups": [                 {                     "groupid": "4",                     "name": "Zabbix servers",                     "internal": "0"                 }             ],             "timeperiods": [                 {                     "timeperiodid": "4",                     "timeperiod_type": "3",                     "every": "1",                     "month": "0",                     "dayofweek": "1",                     "day": "0",                     "start_time": "64800",                     "period": "3600",                     "start_date": "2147483647"                 }             ]         }     ],     "id": 1 } ```  

en-us	#### Retrieving maintenances  Retrieve all configured maintenances, and the data about the assigned host groups, defined time periods and problem tags.  Request:  ```json {     "jsonrpc": "2.0",     "method": "maintenance.get",     "params": {         "output": "extend",         "selectGroups": "extend",         "selectTimeperiods": "extend",         "selectTags": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "maintenanceid": "3",             "name": "Sunday maintenance",             "maintenance_type": "0",             "description": "",             "active_since": "1358844540",             "active_till": "1390466940",             "tags_evaltype": "0",             "groups": [                 {                     "groupid": "4",                     "name": "Zabbix servers",                     "internal": "0"                 }             ],             "timeperiods": [                 {                     "timeperiod_type": "3",                     "every": "1",                     "month": "0",                     "dayofweek": "1",                     "day": "0",                     "start_time": "64800",                     "period": "3600",                     "start_date": "2147483647"                 }             ],             "tags": [                 {                     "tag": "service",                     "operator": "0",                     "value": "mysqld",                 },                 {                     "tag": "error",                     "operator": "2",                     "value": ""                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 检索维护周期  检索所有已配置的维护，以及有关分配的主机组、定义的时间段和问题标签的数据。 请求:  ```json {     "jsonrpc": "2.0",     "method": "maintenance.get",     "params": {         "output": "extend",         "selectGroups": "extend",         "selectTimeperiods": "extend",         "selectTags": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "maintenanceid": "3",             "name": "Sunday maintenance",             "maintenance_type": "0",             "description": "",             "active_since": "1358844540",             "active_till": "1390466940",             "tags_evaltype": "0",             "groups": [                 {                     "groupid": "4",                     "name": "Zabbix servers",                     "internal": "0"                 }             ],             "timeperiods": [                 {                     "timeperiod_type": "3",                     "every": "1",                     "month": "0",                     "dayofweek": "1",                     "day": "0",                     "start_time": "64800",                     "period": "3600",                     "start_date": "2147483647"                 }             ],             "tags": [                 {                     "tag": "service",                     "operator": "0",                     "value": "mysqld",                 },                 {                     "tag": "error",                     "operator": "2",                     "value": ""                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieving media types  Retrieve all configured media types.  Request:  ```json {     "jsonrpc": "2.0",     "method": "mediatype.get",     "params": {         "output": "extend",         "selectMessageTemplates": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "mediatypeid": "1",             "type": "0",             "name": "Email",             "smtp_server": "mail.example.com",             "smtp_helo": "example.com",             "smtp_email": "zabbix@example.com",             "exec_path": "",             "gsm_modem": "",             "username": "",             "passwd": "",             "status": "0",             "smtp_port": "25",             "smtp_security": "0",             "smtp_verify_peer": "0",             "smtp_verify_host": "0",             "smtp_authentication": "0",             "exec_params": "",             "maxsessions": "1",             "maxattempts": "3",             "attempt_interval": "10s",             "content_type": "0",             "script": "",             "timeout": "30s",             "process_tags": "0",             "show_event_menu": "1",             "event_menu_url": "",             "event_menu_name": "",             "description": "",             "message_templates": [                 {                     "eventsource": "0",                     "recovery": "0",                     "subject": "Problem: {EVENT.NAME}",                     "message": "Problem started at {EVENT.TIME} on {EVENT.DATE}\r\nProblem name: {EVENT.NAME}\r\nHost: {HOST.NAME}\r\nSeverity: {EVENT.SEVERITY}\r\nOperational data: {EVENT.OPDATA}\r\nOriginal problem ID: {EVENT.ID}\r\n{TRIGGER.URL}"                 },                 {                     "eventsource": "0",                     "recovery": "1",                     "subject": "Resolved: {EVENT.NAME}",                     "message": "Problem has been resolved at {EVENT.RECOVERY.TIME} on {EVENT.RECOVERY.DATE}\r\nProblem name: {EVENT.NAME}\r\nHost: {HOST.NAME}\r\nSeverity: {EVENT.SEVERITY}\r\n\r\nOriginal problem ID: {EVENT.ID}\r\n{TRIGGER.URL}"                 },                 {                     "eventsource": "0",                     "recovery": "2",                     "subject": "Updated problem: {EVENT.NAME}",                     "message": "{USER.FULLNAME} {EVENT.UPDATE.ACTION} problem at {EVENT.UPDATE.DATE} {EVENT.UPDATE.TIME}.\r\n{EVENT.UPDATE.MESSAGE}\r\n\r\nCurrent problem status is {EVENT.STATUS}, acknowledged: {EVENT.ACK.STATUS}."                 },                 {                     "eventsource": "1",                     "recovery": "0",                     "subject": "Discovery: {DISCOVERY.DEVICE.STATUS} {DISCOVERY.DEVICE.IPADDRESS}",                     "message": "Discovery rule: {DISCOVERY.RULE.NAME}\r\n\r\nDevice IP: {DISCOVERY.DEVICE.IPADDRESS}\r\nDevice DNS: {DISCOVERY.DEVICE.DNS}\r\nDevice status: {DISCOVERY.DEVICE.STATUS}\r\nDevice uptime: {DISCOVERY.DEVICE.UPTIME}\r\n\r\nDevice service name: {DISCOVERY.SERVICE.NAME}\r\nDevice service port: {DISCOVERY.SERVICE.PORT}\r\nDevice service status: {DISCOVERY.SERVICE.STATUS}\r\nDevice service uptime: {DISCOVERY.SERVICE.UPTIME}"                 },                 {                     "eventsource": "2",                     "recovery": "0",                     "subject": "Autoregistration: {HOST.HOST}",                     "message": "Host name: {HOST.HOST}\r\nHost IP: {HOST.IP}\r\nAgent port: {HOST.PORT}"                 }             ],             "parameters": []         },         {             "mediatypeid": "3",             "type": "2",             "name": "SMS",             "smtp_server": "",             "smtp_helo": "",             "smtp_email": "",             "exec_path": "",             "gsm_modem": "/dev/ttyS0",             "username": "",             "passwd": "",             "status": "0",             "smtp_port": "25",             "smtp_security": "0",             "smtp_verify_peer": "0",             "smtp_verify_host": "0",             "smtp_authentication": "0",             "exec_params": "",             "maxsessions": "1",             "maxattempts": "3",             "attempt_interval": "10s",             "content_type": "1",             "script": "",             "timeout": "30s",             "process_tags": "0",             "show_event_menu": "1",             "event_menu_url": "",             "event_menu_name": "",             "description": "",             "message_templates": [                 {                     "eventsource": "0",                     "recovery": "0",                     "subject": "",                     "message": "{EVENT.SEVERITY}: {EVENT.NAME}\r\nHost: {HOST.NAME}\r\n{EVENT.DATE} {EVENT.TIME}"                 },                 {                     "eventsource": "0",                     "recovery": "1",                     "subject": "",                     "message": "RESOLVED: {EVENT.NAME}\r\nHost: {HOST.NAME}\r\n{EVENT.DATE} {EVENT.TIME}"                 },                 {                     "eventsource": "0",                     "recovery": "2",                     "subject": "",                     "message": "{USER.FULLNAME} {EVENT.UPDATE.ACTION} problem at {EVENT.UPDATE.DATE} {EVENT.UPDATE.TIME}"                 },                 {                     "eventsource": "1",                     "recovery": "0",                     "subject": "",                     "message": "Discovery: {DISCOVERY.DEVICE.STATUS} {DISCOVERY.DEVICE.IPADDRESS}"                 },                 {                     "eventsource": "2",                     "recovery": "0",                     "subject": "",                     "message": "Autoregistration: {HOST.HOST}\r\nHost IP: {HOST.IP}\r\nAgent port: {HOST.PORT}"                 }             ],             "parameters": []         }     ],     "id": 1 } ```
zh-cn	### 检索媒介类型  检索所有配置的媒介类型。  请求：  ```json {     "jsonrpc": "2.0",     "method": "mediatype.get",     "params": {         "output": "extend",         "selectMessageTemplates": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "mediatypeid": "1",             "type": "0",             "name": "Email",             "smtp_server": "mail.example.com",             "smtp_helo": "example.com",             "smtp_email": "zabbix@example.com",             "exec_path": "",             "gsm_modem": "",             "username": "",             "passwd": "",             "status": "0",             "smtp_port": "25",             "smtp_security": "0",             "smtp_verify_peer": "0",             "smtp_verify_host": "0",             "smtp_authentication": "0",             "exec_params": "",             "maxsessions": "1",             "maxattempts": "3",             "attempt_interval": "10s",             "content_type": "0",             "script": "",             "timeout": "30s",             "process_tags": "0",             "show_event_menu": "1",             "event_menu_url": "",             "event_menu_name": "",             "description": "",             "message_templates": [                 {                     "eventsource": "0",                     "recovery": "0",                     "subject": "Problem: {EVENT.NAME}",                     "message": "Problem started at {EVENT.TIME} on {EVENT.DATE}\r\nProblem name: {EVENT.NAME}\r\nHost: {HOST.NAME}\r\nSeverity: {EVENT.SEVERITY}\r\nOperational data: {EVENT.OPDATA}\r\nOriginal problem ID: {EVENT.ID}\r\n{TRIGGER.URL}"                 },                 {                     "eventsource": "0",                     "recovery": "1",                     "subject": "Resolved: {EVENT.NAME}",                     "message": "Problem has been resolved at {EVENT.RECOVERY.TIME} on {EVENT.RECOVERY.DATE}\r\nProblem name: {EVENT.NAME}\r\nHost: {HOST.NAME}\r\nSeverity: {EVENT.SEVERITY}\r\n\r\nOriginal problem ID: {EVENT.ID}\r\n{TRIGGER.URL}"                 },                 {                     "eventsource": "0",                     "recovery": "2",                     "subject": "Updated problem: {EVENT.NAME}",                     "message": "{USER.FULLNAME} {EVENT.UPDATE.ACTION} problem at {EVENT.UPDATE.DATE} {EVENT.UPDATE.TIME}.\r\n{EVENT.UPDATE.MESSAGE}\r\n\r\nCurrent problem status is {EVENT.STATUS}, acknowledged: {EVENT.ACK.STATUS}."                 },                 {                     "eventsource": "1",                     "recovery": "0",                     "subject": "Discovery: {DISCOVERY.DEVICE.STATUS} {DISCOVERY.DEVICE.IPADDRESS}",                     "message": "Discovery rule: {DISCOVERY.RULE.NAME}\r\n\r\nDevice IP: {DISCOVERY.DEVICE.IPADDRESS}\r\nDevice DNS: {DISCOVERY.DEVICE.DNS}\r\nDevice status: {DISCOVERY.DEVICE.STATUS}\r\nDevice uptime: {DISCOVERY.DEVICE.UPTIME}\r\n\r\nDevice service name: {DISCOVERY.SERVICE.NAME}\r\nDevice service port: {DISCOVERY.SERVICE.PORT}\r\nDevice service status: {DISCOVERY.SERVICE.STATUS}\r\nDevice service uptime: {DISCOVERY.SERVICE.UPTIME}"                 },                 {                     "eventsource": "2",                     "recovery": "0",                     "subject": "Autoregistration: {HOST.HOST}",                     "message": "Host name: {HOST.HOST}\r\nHost IP: {HOST.IP}\r\nAgent port: {HOST.PORT}"                 }             ],             "parameters": []         },         {             "mediatypeid": "3",             "type": "2",             "name": "SMS",             "smtp_server": "",             "smtp_helo": "",             "smtp_email": "",             "exec_path": "",             "gsm_modem": "/dev/ttyS0",             "username": "",             "passwd": "",             "status": "0",             "smtp_port": "25",             "smtp_security": "0",             "smtp_verify_peer": "0",             "smtp_verify_host": "0",             "smtp_authentication": "0",             "exec_params": "",             "maxsessions": "1",             "maxattempts": "3",             "attempt_interval": "10s",             "content_type": "1",             "script": "",             "timeout": "30s",             "process_tags": "0",             "show_event_menu": "1",             "event_menu_url": "",             "event_menu_name": "",             "description": "",             "message_templates": [                 {                     "eventsource": "0",                     "recovery": "0",                     "subject": "",                     "message": "{EVENT.SEVERITY}: {EVENT.NAME}\r\nHost: {HOST.NAME}\r\n{EVENT.DATE} {EVENT.TIME}"                 },                 {                     "eventsource": "0",                     "recovery": "1",                     "subject": "",                     "message": "RESOLVED: {EVENT.NAME}\r\nHost: {HOST.NAME}\r\n{EVENT.DATE} {EVENT.TIME}"                 },                 {                     "eventsource": "0",                     "recovery": "2",                     "subject": "",                     "message": "{USER.FULLNAME} {EVENT.UPDATE.ACTION} problem at {EVENT.UPDATE.DATE} {EVENT.UPDATE.TIME}"                 },                 {                     "eventsource": "1",                     "recovery": "0",                     "subject": "",                     "message": "Discovery: {DISCOVERY.DEVICE.STATUS} {DISCOVERY.DEVICE.IPADDRESS}"                 },                 {                     "eventsource": "2",                     "recovery": "0",                     "subject": "",                     "message": "Autoregistration: {HOST.HOST}\r\nHost IP: {HOST.IP}\r\nAgent port: {HOST.PORT}"                 }             ],             "parameters": []         }     ],     "id": 1 } ```

en-us	#### Retrieving report data  Request:  ```json {     "jsonrpc": "2.0",     "method": "report.get",     "params": [         "output": "extend",         "selectUsers": "extend",         "selectUserGroups": "extend",         "reportids": ["1", "2"]     ],     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "reportid": "1",             "userid": "1",             "name": "Weekly report",             "dashboardid": "1",             "period": "1",             "cycle": "1",             "start_time": "43200",             "weekdays": "31",             "active_since": "2021-04-01",             "active_till": "2021-08-31",             "subject": "Weekly report",             "message": "Report accompanying text",             "status": "1",             "description": "Report description",             "state": "1",             "lastsent": "1613563219",             "info": "",             "users": [                 {                     "userid": "1",                     "access_userid": "1",                     "exclude": "0"                 },                 {                     "userid": "2",                     "access_userid": "0",                     "exclude": "1"                 }             ],             "user_groups": [                 {                     "usrgrpid": "7",                     "access_userid": "0"                 }             ]         },         {             "reportid": "2",             "userid": "1",             "name": "Monthly report",             "dashboardid": "2",             "period": "2",             "cycle": "2",             "start_time": "0",             "weekdays": "0",             "active_since": "2021-05-01",             "active_till": "",             "subject": "Monthly report",             "message": "Report accompanying text",             "status": "1",             "description": "",             "state": "0",             "lastsent": "0",             "info": "",             "users": [                 {                     "userid": "1",                     "access_userid": "1",                     "exclude": "0"                 }             ],             "user_groups": []         }     ],     "id": 1 } ```
zh-cn	#### 检索报告数据  请求：  ```json {     "jsonrpc": "2.0",     "method": "report.get",     "params": [         "output": "extend",         "selectUsers": "extend",         "selectUserGroups": "extend",         "reportids": ["1", "2"]     ],     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "reportid": "1",             "userid": "1",             "name": "Weekly report",             "dashboardid": "1",             "period": "1",             "cycle": "1",             "start_time": "43200",             "weekdays": "31",             "active_since": "2021-04-01",             "active_till": "2021-08-31",             "subject": "Weekly report",             "message": "Report accompanying text",             "status": "1",             "description": "Report description",             "state": "1",             "lastsent": "1613563219",             "info": "",             "users": [                 {                     "userid": "1",                     "access_userid": "1",                     "exclude": "0"                 },                 {                     "userid": "2",                     "access_userid": "0",                     "exclude": "1"                 }             ],             "user_groups": [                 {                     "usrgrpid": "7",                     "access_userid": "0"                 }             ]         },         {             "reportid": "2",             "userid": "1",             "name": "Monthly report",             "dashboardid": "2",             "period": "2",             "cycle": "2",             "start_time": "0",             "weekdays": "0",             "active_since": "2021-05-01",             "active_till": "",             "subject": "Monthly report",             "message": "Report accompanying text",             "status": "1",             "description": "",             "state": "0",             "lastsent": "0",             "info": "",             "users": [                 {                     "userid": "1",                     "access_userid": "1",                     "exclude": "0"                 }             ],             "user_groups": []         }     ],     "id": 1 } ```

en-us	#### Retrieving role data  Retrieve "Super admin role" role data and its access rules.  Request:  ```json {     "jsonrpc": "2.0",     "method": "role.get",     "params": {         "output": "extend",         "selectRules": "extend",         "roleids": "3"     },     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "roleid": "3",             "name": "Super admin role",             "type": "3",             "readonly": "1",             "rules": {                 "ui": [                     {                         "name": "inventory.hosts",                         "status": "1"                     },                     {                         "name": "inventory.overview",                         "status": "1"                     },                                         {                         "name": "monitoring.dashboard",                         "status": "1"                     },                     {                         "name": "monitoring.hosts",                         "status": "1"                     },                     {                         "name": "monitoring.latest_data",                         "status": "1"                     },                     {                         "name": "monitoring.maps",                         "status": "1"                     },                     {                         "name": "monitoring.problems",                         "status": "1"                     },                                         {                         "name": "reports.availability_report",                         "status": "1"                     },                     {                         "name": "reports.top_triggers",                         "status": "1"                     },                                          {                         "name": "services.services",                         "status": "1"                     },                     {                         "name": "services.sla_report",                         "status": "1"                     },                     {                         "name": "configuration.actions",                         "status": "1"                     },                                         {                         "name": "configuration.discovery",                         "status": "1"                     },                     {                         "name": "configuration.host_groups",                         "status": "1"                     },                                         {                         "name": "configuration.hosts",                         "status": "1"                     },                     {                         "name": "configuration.maintenance",                         "status": "1"                     },                                         {                         "name": "configuration.templates",                         "status": "1"                     },                     {                         "name": "monitoring.discovery",                         "status": "1"                     },                     {                         "name": "reports.notifications",                         "status": "1"                     },                     {                         "name": "reports.scheduled_reports",                         "status": "1"                     },                     {                         "name": "services.actions",                         "status": "1"                     },                     {                         "name": "services.sla",                         "status": "1"                     },                     {                         "name": "administration.authentication",                         "status": "1"                     },                     {                         "name": "administration.general",                         "status": "1"                     },                     {                         "name": "administration.media_types",                         "status": "1"                     },                                         {                         "name": "administration.proxies",                         "status": "1"                     },                     {                         "name": "administration.queue",                         "status": "1"                     },                     {                         "name": "administration.scripts",                         "status": "1"                     },                                         {                         "name": "administration.user_groups",                         "status": "1"                     },                     {                         "name": "administration.user_roles",                         "status": "1"                     },                     {                         "name": "administration.users",                         "status": "1"                     },                     {                         "name": "configuration.event_correlation",                         "status": "1"                     },                      {                         "name": "reports.action_log",                         "status": "1"                     },                     {                         "name": "reports.audit",                         "status": "1"                     },                     {                         "name": "reports.system_info",                         "status": "1"                     }                 ],                 "ui.default_access": "1",                 "services.read.mode": "1",                 "services.read.list": [],                 "services.read.tag": {                     "tag": "",                     "value": ""                 },                 "services.write.mode": "1",                 "services.write.list": [],                 "services.write.tag": {                     "tag": "",                     "value": ""                 },                 "modules": [],                 "modules.default_access": "1",                 "api.access": "1",                 "api.mode": "0",                 "api": [],                 "actions": [                     {                         "name": "edit_dashboards",                         "status": "1"                     },                     {                         "name": "edit_maps",                         "status": "1"                     },                     {                         "name": "acknowledge_problems",                         "status": "1"                     },                     {                         "name": "close_problems",                         "status": "1"                     },                     {                         "name": "change_severity",                         "status": "1"                     },                     {                         "name": "add_problem_comments",                         "status": "1"                     },                     {                         "name": "execute_scripts",                         "status": "1"                     },                     {                         "name": "manage_api_tokens",                         "status": "1"                     },                     {                         "name": "edit_maintenance",                         "status": "1"                     },                     {                         "name": "manage_scheduled_reports",                         "status": "1"                     },                     {                         "name": "manage_sla",                         "status": "1"                     }                                     ],                 "actions.default_access": "1"             }         }     ],     "id": 1 } ```
zh-cn	#### 检索角色数据  检索单个 "超级用户角色" 角色数据和其访问规则。  请求：  ```json {     "jsonrpc": "2.0",     "method": "role.get",     "params": [         "output": "extend",         "selectRules": "extend",         "roleids": "3"     ],     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "roleid": "3",             "name": "Super admin role",             "type": "3",             "readonly": "1",             "rules": {                 "ui": [                     {                         "name": "monitoring.dashboard",                         "status": "1"                     },                     {                         "name": "monitoring.problems",                         "status": "1"                     },                     {                         "name": "monitoring.hosts",                         "status": "1"                     },                     {                         "name": "monitoring.latest_data",                         "status": "1"                     },                     {                         "name": "monitoring.maps",                         "status": "1"                     },                     {                         "name": "monitoring.services",                         "status": "1"                     },                     {                         "name": "inventory.overview",                         "status": "1"                     },                     {                         "name": "inventory.hosts",                         "status": "1"                     },                     {                         "name": "reports.availability_report",                         "status": "1"                     },                     {                         "name": "reports.top_triggers",                         "status": "1"                     },                     {                         "name": "monitoring.discovery",                         "status": "1"                     },                     {                         "name": "reports.notifications",                         "status": "1"                     },                     {                         "name": "reports.scheduled_reports",                         "status": "1"                     },                     {                         "name": "configuration.host_groups",                         "status": "1"                     },                     {                         "name": "configuration.templates",                         "status": "1"                     },                     {                         "name": "configuration.hosts",                         "status": "1"                     },                     {                         "name": "configuration.maintenance",                         "status": "1"                     },                     {                         "name": "configuration.actions",                         "status": "1"                     },                     {                         "name": "configuration.discovery",                         "status": "1"                     },                     {                         "name": "reports.system_info",                         "status": "1"                     },                     {                         "name": "reports.audit",                         "status": "1"                     },                     {                         "name": "reports.action_log",                         "status": "1"                     },                     {                         "name": "configuration.event_correlation",                         "status": "1"                     },                     {                         "name": "administration.general",                         "status": "1"                     },                     {                         "name": "administration.proxies",                         "status": "1"                     },                     {                         "name": "administration.authentication",                         "status": "1"                     },                     {                         "name": "administration.user_groups",                         "status": "1"                     },                     {                         "name": "administration.user_roles",                         "status": "1"                     },                     {                         "name": "administration.users",                         "status": "1"                     },                     {                         "name": "administration.media_types",                         "status": "1"                     },                     {                         "name": "administration.scripts",                         "status": "1"                     },                     {                         "name": "administration.queue",                         "status": "1"                     }                 ],                 "ui.default_access": "1",                 "services.read.mode": "1",                 "services.read.list": [],                 "services.read.tag": {                     "tag": "",                     "value": ""                 },                 "services.write.mode": "1",                 "services.write.list": [],                 "services.write.tag": {                     "tag": "",                     "value": ""                 },                 "modules": [],                 "modules.default_access": "1",                 "api.access": "1",                 "api.mode": "0",                 "api": [],                 "actions": [                     {                         "name": "edit_dashboards",                         "status": "1"                     },                     {                         "name": "edit_maps",                         "status": "1"                     },                     {                         "name": "acknowledge_problems",                         "status": "1"                     },                     {                         "name": "close_problems",                         "status": "1"                     },                     {                         "name": "change_severity",                         "status": "1"                     },                     {                         "name": "add_problem_comments",                         "status": "1"                     },                     {                         "name": "execute_scripts",                         "status": "1"                     },                     {                         "name": "manage_api_tokens",                         "status": "1"                     },                     {                         "name": "edit_maintenance",                         "status": "1"                     },                     {                         "name": "manage_scheduled_reports",                         "status": "1"                     }                 ],                 "actions.default_access": "1"             }         }     ],     "id": 1 } ```

en-us	#### Retrieving template dashboards  Retrieve all template dashboards with widgets for a specified template.  Request:  ```json {     "jsonrpc": "2.0",     "method": "templatedashboard.get",     "params": {         "output": "extend",         "selectPages": "extend",         "templateids": "10001"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "dashboardid": "23",             "name": "Docker overview",             "templateid": "10001",             "display_period": "30",             "auto_start": "1",             "uuid": "6dfcbe0bc5ad400ea9c1c2dd7649282f",             "pages": [                 {                     "dashboard_pageid": "1",                     "name": "",                     "display_period": "0",                     "widgets": [                         {                             "widgetid": "220",                             "type": "graph",                             "name": "",                             "x": "0",                             "y": "0",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1125"                                 }                             ]                         },                         {                             "widgetid": "221",                             "type": "graph",                             "name": "",                             "x": "12",                             "y": "0",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1129"                                 }                             ]                         },                         {                             "widgetid": "222",                             "type": "graph",                             "name": "",                             "x": "0",                             "y": "5",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1128"                                 }                             ]                         },                         {                             "widgetid": "223",                             "type": "graph",                             "name": "",                             "x": "12",                             "y": "5",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1126"                                 }                             ]                         },                         {                             "widgetid": "224",                             "type": "graph",                             "name": "",                             "x": "0",                             "y": "10",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1127"                                 }                             ]                         }                     ]                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 检索模板仪表盘  检索指定模板的所有带有组件的模板仪表盘。  请求：  ```json {     "jsonrpc": "2.0",     "method": "templatedashboard.get",     "params": {         "output": "extend",         "selectPages": "extend",         "templateids": "10001"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "dashboardid": "23",             "name": "Docker overview",             "templateid": "10001",             "display_period": "30",             "auto_start": "1",             "uuid": "6dfcbe0bc5ad400ea9c1c2dd7649282f",             "pages": [                 {                     "dashboard_pageid": "1",                     "name": "",                     "display_period": "0",                     "widgets": [                         {                             "widgetid": "220",                             "type": "graph",                             "name": "",                             "x": "0",                             "y": "0",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1125"                                 }                             ]                         },                         {                             "widgetid": "221",                             "type": "graph",                             "name": "",                             "x": "12",                             "y": "0",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1129"                                 }                             ]                         },                         {                             "widgetid": "222",                             "type": "graph",                             "name": "",                             "x": "0",                             "y": "5",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1128"                                 }                             ]                         },                         {                             "widgetid": "223",                             "type": "graph",                             "name": "",                             "x": "12",                             "y": "5",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1126"                                 }                             ]                         },                         {                             "widgetid": "224",                             "type": "graph",                             "name": "",                             "x": "0",                             "y": "10",                             "width": "12",                             "height": "5",                             "view_mode": "0",                             "fields": [                                 {                                     "type": "6",                                     "name": "graphid",                                     "value": "1127"                                 }                             ]                         }                     ]                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieving templates by name  Retrieve all data about two templates named "Linux" and "Windows".  Request:  ```json {     "jsonrpc": "2.0",     "method": "template.get",     "params": {         "output": "extend",         "filter": {             "host": [                 "Linux",                 "Windows"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "proxy_hostid": "0",             "host": "Linux",             "status": "3",             "disable_until": "0",             "error": "",             "available": "0",             "errors_from": "0",             "lastaccess": "0",             "ipmi_authtype": "0",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "ipmi_available": "0",             "snmp_disable_until": "0",             "snmp_available": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "ipmi_errors_from": "0",             "snmp_errors_from": "0",             "ipmi_error": "",             "snmp_error": "",             "jmx_disable_until": "0",             "jmx_available": "0",             "jmx_errors_from": "0",             "jmx_error": "",             "name": "Linux",             "flags": "0",             "templateid": "10001",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "tls_psk_identity": "",             "tls_psk": "",             "uuid": "282ffe33afc74cccaf1524d9aa9dc502"         },         {             "proxy_hostid": "0",             "host": "Windows",             "status": "3",             "disable_until": "0",             "error": "",             "available": "0",             "errors_from": "0",             "lastaccess": "0",             "ipmi_authtype": "0",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "ipmi_available": "0",             "snmp_disable_until": "0",             "snmp_available": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "ipmi_errors_from": "0",             "snmp_errors_from": "0",             "ipmi_error": "",             "snmp_error": "",             "jmx_disable_until": "0",             "jmx_available": "0",             "jmx_errors_from": "0",             "jmx_error": "",             "name": "Windows",             "flags": "0",             "templateid": "10081",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "tls_psk_identity": "",             "tls_psk": "",             "uuid": "522d17e1834049be879287b7c0518e5d"         }     ],     "id": 1 } ```
zh-cn	#### 按名称检索模版  检索有关名为“Linux”和“Windows”的两个模板的所有数据。  请求:  ```json {     "jsonrpc": "2.0",     "method": "template.get",     "params": {         "output": "extend",         "filter": {             "host": [                 "Linux",                 "Windows"             ]         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "proxy_hostid": "0",             "host": "Linux",             "status": "3",             "disable_until": "0",             "error": "",             "available": "0",             "errors_from": "0",             "lastaccess": "0",             "ipmi_authtype": "0",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "ipmi_available": "0",             "snmp_disable_until": "0",             "snmp_available": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "ipmi_errors_from": "0",             "snmp_errors_from": "0",             "ipmi_error": "",             "snmp_error": "",             "jmx_disable_until": "0",             "jmx_available": "0",             "jmx_errors_from": "0",             "jmx_error": "",             "name": "Linux",             "flags": "0",             "templateid": "10001",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "tls_psk_identity": "",             "tls_psk": "",             "uuid": "282ffe33afc74cccaf1524d9aa9dc502"         },         {             "proxy_hostid": "0",             "host": "Windows",             "status": "3",             "disable_until": "0",             "error": "",             "available": "0",             "errors_from": "0",             "lastaccess": "0",             "ipmi_authtype": "0",             "ipmi_privilege": "2",             "ipmi_username": "",             "ipmi_password": "",             "ipmi_disable_until": "0",             "ipmi_available": "0",             "snmp_disable_until": "0",             "snmp_available": "0",             "maintenanceid": "0",             "maintenance_status": "0",             "maintenance_type": "0",             "maintenance_from": "0",             "ipmi_errors_from": "0",             "snmp_errors_from": "0",             "ipmi_error": "",             "snmp_error": "",             "jmx_disable_until": "0",             "jmx_available": "0",             "jmx_errors_from": "0",             "jmx_error": "",             "name": "Windows",             "flags": "0",             "templateid": "10081",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "tls_psk_identity": "",             "tls_psk": "",             "uuid": "522d17e1834049be879287b7c0518e5d"         }     ],     "id": 1 } ```

en-us	#### Retrieving the version of the API  Retrieve the version of the Zabbix API.  Request:  ```json {     "jsonrpc": "2.0",     "method": "apiinfo.version",     "params": [],     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": "4.0.0",     "id": 1 } ```
zh-cn	#### 检索 API 版本  检索 Zabbix API 版本。  请求：  ``` {.json} {     "jsonrpc": "2.0",     "method": "apiinfo.version",     "params": [],     "id": 1 } ```  响应：  ``` {.json} {     "jsonrpc": "2.0",     "result": "4.0.0",     "id": 1 } ```