[comment]: # translation:outdated

[comment]: # ({bf12fc32-bf12fc32})

# service.delete

[comment]: # ({/bf12fc32-bf12fc32})

[comment]: # ({4bcc8245-8ea5261f})
### 描述

`object service.delete(array serviceIds)`

此方法允许删除服务。

::: noteclassic
此方法允许任何用户使用。可以在用户角色设置中撤销调用此方法的权限。更多信息请查看 [用户角色](/manual/web_interface/frontend_sections/administration/user_roles)。
:::

[comment]: # ({/4bcc8245-8ea5261f})

[comment]: # ({7af05f92-7af05f92})

### 参数

`(数组)` 要删除的服务ID。

[comment]: # ({/7af05f92-7af05f92})

[comment]: # ({23960c29-23960c29})

### 返回值

`(对象)` 返回一个`serviceids` 属性包含被删除服务ID的对象。

[comment]: # ({/23960c29-23960c29})

[comment]: # ({b41637d2-b41637d2})

### 示例

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({c2c4f1f3-5036ec70})
#### 删除多个服务

删除两个服务。

请求：

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

响应：

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

[comment]: # ({/c2c4f1f3-5036ec70})

[comment]: # ({c99e5046-c99e5046})

### 来源

CService::delete() 在*ui/include/classes/api/services/CService.php*。

[comment]: # ({/c99e5046-c99e5046})
