[comment]: # ({17e99ab8-17e99ab8})
# housekeeping.update

[comment]: # ({/17e99ab8-17e99ab8})

[comment]: # ({e666a98a-e666a98a})
### 描述

`object housekeeping.update(object housekeeping)`

此方法允许update现有的housekeeping设置。

::: noteclassic
此方法仅适用于*超级管理员*用户类型。
调用该方法的权限可以在用户角色设置中撤销。有关更多信息，请参阅
[User
roles](/manual/web_interface/frontend_sections/administration/user_roles)

:::

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

[comment]: # ({59628702-59628702})
### 参数

`(object)` 待更新的管家属性。

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

[comment]: # ({440363c6-440363c6})
### 返回值

`(array)` 返回包含已更新参数名称的array。

[comment]: # ({/440363c6-440363c6})

[comment]: # ({9c2a7737-16b418fc})
### 示例

请求:

```json
{
    "jsonrpc": "2.0",
    "method": "housekeeping.update",
    "params": {
        "hk_events_mode": "1",
        "hk_events_trigger": "200d",
        "hk_events_internal": "2d",
        "hk_events_discovery": "2d"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```
响应:

```json
{
    "jsonrpc": "2.0",
    "result": [
        "hk_events_mode",
        "hk_events_trigger",
        "hk_events_internal",
        "hk_events_discovery"
    ],
    "id": 1
}
```

[comment]: # ({/9c2a7737-16b418fc})

[comment]: # ({d089883f-d089883f})
### 来源

CHousekeeping::update() 位于
*ui/include/classes/api/services/CHousekeeping.php* 文件中.

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