[comment]: # translation:outdated

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

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

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

`object housekeeping.update(object housekeeping)`

这种方法可以更新现有的数据清理设置。

::: noteclassic
该方法仅适用于 *Super admin* 用户类型，调用该方法的权限可在用户角色设置中撤销。更多信息请参阅 [用户角色](/manual/web_interface/frontend_sections/users/user_roles)。
:::

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

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

`(object)` 要更新的 [数据清理属性](object#housekeeping)。

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

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

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

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

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

[请求](/manual/api#performing-requests)：

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

响应：

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

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

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

CHousekeeping::update() 在
*ui/include/classes/api/services/CHousekeeping.php*.

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