Zabbix Documentation 1.8

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

api:template:delete

Table of Contents

delete()

Available since version: 1.8
This function allows you to delete information about one or several templates. All template-related information will be removed including items, graphs, macros, application, etc.

Parameters

ParameterTypeOptionalDescriptionDetails
templateidsarray Array of Template IDs

Returns

ParameterDescription
resultOperation successful. Result will contain array of deleted Template IDs.
errorIn case of any errors

Example

{
"jsonrpc":"2.0",
"method":"template.delete",
"params":[
      {
         "templateid":107824
      },
      {
         "templateid":107825
      }
],
"auth":"3a57200802b24cda67c4e4010b50c065",
"id":2
}

Templates deleted successfully:

{
"jsonrpc":"2.0",
"result":{
   "templateids": ["107824", "107825"]
},
"id":2
}
Template does not exist:

{
"jsonrpc":"2.0",
"error":{
      "code":-32500,
      "message":"Application error.",
      "data":"[ CTemplate::delete ] Template does not exist"
},
"id":2
}