hostprototype.update
This method allows to update existing host prototypes.
This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See for more information.
Parameters
(object/array)
Host prototype properties to be updated.
The hostid
property must be defined for each host prototype, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
(object)
Returns an object containing the IDs of the updated host prototypes under the hostids
property.
Examples
Disabling a host prototype
Disable a host prototype, that is, set its status to “1”.
Response:
{
"jsonrpc": "2.0",
"result": {
"hostids": [
]
},
"id": 1
}
Updating host prototype tags
Response:
{
"jsonrpc": "2.0",
"result": {
"hostids": [
"10092"
]
"id": 1
}
Updating host prototype custom interfaces
Replace inherited interfaces with host prototype custom interfaces.
"jsonrpc": "2.0",
"result": {
"hostids": [
"10092"
]
},
"id": 1
Source
CHostPrototype::update() in ui/include/classes/api/services/CHostPrototype.php.