Available since version: 1.8
Mass add template linkage, host linkage, macros, host groups
multidimensional array with data
Parameter | Type | Optional | Description | Details |
---|---|---|---|---|
templates | array | Template objects to update | ||
templates_link | array | Yes | Template objects which should be linked to templates. | |
hosts | array | Yes | Host objects which should be linked to templates. | |
groups | array | Yes | Host group objects where templates should be added. | |
macros | array | Yes | Macros objects which should be added to templates. |
Parameter | Description |
---|---|
result | Operation successful. Result will contain array of updated Template IDs. |
error | In case of any errors |
Link two Hosts to template with ID "100100000010001", and add this template to group with ID "100100000000041"
{
"jsonrpc":"2.0",
"method":"template.massAdd",
"params":{
"templates": [{"templateid": "100100000010001"}],
"groups": [{"groupid": "100100000000041"}],
"hosts": [{"hostid": "100100000010092"},{"hostid": "100100000011197"}]
},
"auth":"f223adf833b2bf2ff38574a67bba6372",
"id":2
}
Templates updated successfully: