The method allows to retrieve templates according to the given parameters该方法允许根据指定的参数检索模板.
(object)
Parameters defining the desired output定义所需输出的参数.
The method supports the following parameters该方法支持以下参数.
Retrieving templates by name按名称检索模板
Request请求:
Response响应:
- {
- "jsonrpc": "2.0",
- "result": [
- {
- "proxy_hostid": "0",
- "host": "Template OS 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",
- "ipmi_error": "",
- "snmp_error": "",
- "jmx_disable_until": "0",
- "jmx_available": "0",
- "jmx_errors_from": "0",
- "jmx_error": "",
- "name": "Template OS Linux",
- "flags": "0",
- "templateid": "10001",
- "description": "",
- "tls_connect": "1",
- "tls_accept": "1",
- "tls_issuer": "",
- "tls_subject": "",
- "tls_psk_identity": "",
- "tls_psk": ""
- },
- {
- "proxy_hostid": "0",
- "host": "Template OS 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",
- "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": "Template OS Windows",
- "flags": "0",
- "templateid": "10081",
- "description": "",
- "tls_connect": "1",
- "tls_accept": "1",
- "tls_issuer": "",
- "tls_subject": "",
- "tls_psk_identity": "",
- "tls_psk": ""
- }
- ],
- "id": 1
- }
CTemplate::get() in frontends/php/include/classes/api/services/CTemplate.php.