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

    Parameters 参数

    (object/array) service properties to be updated. (object/array)需要更新的服务属性。 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. 必须为每个服务定义serviceid属性,所有其他属性为可选项。只有通过的属性会被更新,所有其他属性将保持不变。 Additionally to the , the method accepts the following parameters. 除standard service properties之外,该方法接受以下参数。

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

    Examples 范例

    Setting the parent of an service 设置父服务

    Request 请求:

    Response 响应:

    1. {
    2. "result": {
    3. "serviceids": [
    4. "5"
    5. ]
    6. }

    Source 源码

    CService::update() in frontends/php/include/classes/api/services/CService.php. CService::update()方法可在frontends/php/include/classes/api/services/CService.php中参考。