This method allows to update existing services此方法允许更新现有服务.

    Parameters参数

    (object/array) service properties to be updated服务属性要更新.

    The serviceid property must be defined for each service, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.必须为每个服务定义属性,所有其他属性都是可选的。只有通过的属性将被更新,所有其他属性将保持不变。

    Returns an object containing the IDs of the updated services under the serviceids property.(object)返回一个包含属性下更新服务的ID的对象。

    Examples范例

    Setting the parent of an service设置父级服务

    Make service “3” the hard-linked parent of service “5”.使服务“3”链接于父级服务“5”.

    Request请求:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "serviceids": [
    5. "5"
    6. ]
    7. "id": 1
    8. }

    Source源码

    CService::update() in frontends/php/include/classes/api/services/CService.php.