array template.getobjects(object filter)
This method allows to retrieve templates that match the given filter criteria.
This method is deprecated and will be removed in the future. Please use template.get instead.
(object)
Template properties to search by.
(array)
Returns an array of objects with all properties.
Retrieve all data about two templates named “Template OS Linux” and “Template OS Windows”.
Request:
{
"jsonrpc": "2.0",
"method": "template.getobjects",
"params": {
"host": [
"Template OS Linux",
"Template OS Windows"
]
},
"auth": "3a57200802b24cda67c4e4010b50c065",
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": [
{
"host": "Template OS Linux",
"name": "Template OS Linux",
"templateid": "10001",
"description": ""
},
{
"host": "Template OS Windows",
"name": "Template OS Windows",
"templateid": "10081",
"description": ""
}
],
"id": 1
}
CTemplate::getObject() in frontends/php/include/classes/api/services/CTemplate.php.