This method allows you to update a maintenance as defined by the maintenance data array.
Parameter | Type | Optional | Description | Details |
---|---|---|---|---|
maintenance data | array or object | No | Array of Maintenance objects or a single object | maintenanceid must be specified |
groupids | array | No | Host group ids add/remove to/from maintenance | |
hostids | array | No | Host ids add/remove to/from maintenance |
Parameter | Description |
---|---|
result | Operation successful. Result will contain array of updated Maintenance IDs. |
error | In case of any errors |
Update maintenance name, remove all hosts and update groups:
{
"jsonrpc":"2.0",
"method":"maintenance.update",
"params":[{
"maintenanceid":"100100000000005",
"name":"TEST",
"groupids":["100100000010229"],
"hostids":[]
}],
"auth":"038e1d7b1735c6a5436ee9eae095879e",
"id":3
}
Maintenance updated successfully:
Maintenance already exists: