object service.addtimes(object/array serviceTimes)
This method allows to create new service times此方法允许创建新的服务时间.
(object/array)
Service times to create创建服务时间.
The method accepts service times with the standard service time properties. 该方法使用standard service time properties接受服务时间.
(object)
Returns an object containing the IDs of the affected services under the serviceids
property. (object)
返回一个包含serviceids
属性下受影响的服务的ID的对象。
Add a downtime for service "2" scheduled weekly from Monday 22:00 till Tuesday 10:00. 从星期一22:00至星期二10:00每周定期维修"2"的停机时间
Request请求:
{
"jsonrpc": "2.0",
"method": "service.addtimes",
"params": {
"serviceid": "4",
"type": 1,
"ts_from": 165600,
"ts_to": 201600
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response响应:
CService::addTimes() in frontends/php/include/classes/api/services/CService.php.