history.clear
描述
object history.clear(array itemids)
此方法允许 clear 监控项 历史数据。
此方法仅对 管理员 和 超级管理员 用户类型可用。调用该方法的权限可以在用户角色设置中撤销。更多信息请参见 User roles。
参数
(array) 要清除的 监控项 的 ID。
返回值
(object) 返回一个 object,其中包含在 itemids 属性下列出的已清除 监控项 的 ID。
示例
清除历史记录
执行请求:
{
"jsonrpc": "2.0",
"method": "history.clear",
"params": [
"10325",
"13205"
],
"id": 1
}
响应:
```json
{
"jsonrpc": "2.0",
"result": {
"itemids": [
"10325",
"13205"
]
},
"id": 1
}
[comment]: # ({/c73cef81-e482fed3})
[comment]: # ({e7aa34e8-e7aa34e8})
### 来源
*ui/include/classes/api/services/CHistory.php* 中的 CHistory::clear()。
[comment]: # ({/e7aa34e8-e7aa34e8})