service.delete

Description说明

object service.delete(array serviceIds)

This method allows to delete services此方法允许删除服务.

Services with hard-dependent child services cannot be deleted服务与强依赖的子级服务无法删除.

Parameters参数

(array) IDs of the services to delete要删除的服务的ID.

Return values返回值

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

Examples范例

Deleting multiple services删除多个服务

Delete two services删除两个服务.

Request请求:

{
           "jsonrpc": "2.0",
           "method": "service.delete",
           "params": [
               "4",
               "5"
           ],
           "auth": "3a57200802b24cda67c4e4010b50c065",
           "id": 1
       }

Response响应:

{
           "jsonrpc": "2.0",
           "result": {
               "serviceids": [
                   "4",
                   "5"
               ]
           },
           "id": 1
       }

Source源码

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