×
Runtime - Host Templates
This section is for searching for live objects being monitored by Opsview. This is in the Runtime database, hence the URL path is /rest/runtime/{objecttype}
.
URL: /rest/runtime/hosttemplate
.
Requires authentication - requires VIEWALL or VIEWSOME permission.
GET
— returns all host templates.POST
,PUT
,DELETE
— not implemented.
Access Control Copied
VIEWALL allows all host templates to be returned. VIEWSOME allows only host templates that are associated to hosts where permission has been granted based on the access object selection.
Retrieving Host Templates Copied
Parameters:
hostgroupid
— filters host templates based on this host group id, from here downwards. Can be repeated.hostname
— filters host templates based on this hostname. Can be repeated.has_perfdata
— if set, filters host templates so only contains services with performance data. Default unset.
Response:
rows
— the number of actual rows returned.allrows
— the total number of rows based on filtering parameters. Note, since there is no filtering, this will always be total.total
— the total number of rows if filtering is not applied.list
— array of associative arrays of:id
— host template id.name
— name of the host template.
Example response:
{
allrows => 4,
list => [
{ id => 7, name => "Agent only" },
{ id => 1, name => "Base Unix" },
{ id => 3, name => "Cisco Mgt" },
{ id => 2, name => "Network - Base" }
],
rows => 4,
total => 4,
}
["Opsview On-premises"]
["API", "Technical Reference"]