integer/array correlation.get(object parameters)
此方法允许根据给定的参数检索关联。
此方法对于任何用户可用。可以在用户角色设置中撤销调用该方法的权限。更多信息请查看 用户角色。
(object)
定义所需输出的参数。
该方法支持以下参数。
参数 | 类型 | 描述 |
---|---|---|
correlationids | ID/数组 | 仅返回具有给定ID的关联。 |
selectFilter | 查询 | 返回一个filter 属性,其中包含关联条件。 |
selectOperations | 查询 | 返回一个operations 属性,其中包含关联操作。 |
sortfield | 字符串/数组 | 根据给定属性对结果进行排序。 可能的值: correlationid ,name ,status 。 |
countOutput | 布尔值 | 这些参数在参考说明中进行了描述。 |
editable | 布尔值 | |
excludeSearch | 布尔值 | |
filter | 对象 | |
limit | 整数 | |
output | 查询 | |
preservekeys | 布尔值 | |
search | 对象 | |
searchByAny | 布尔值 | |
searchWildcardsEnabled | 布尔值 | |
sortorder | 字符串/数组 | |
startSearch | 布尔值 |
(integer/array)
返回其中之一:
获取所有配置的关联以及关联条件和操作。该过滤器使用“and/or”评估类型,因此 formula
属性为空,并自动生成eval_formula
。
请求:
{
"jsonrpc": "2.0",
"method": "correlation.get",
"params": {
"output": "extend",
"selectOperations": "extend",
"selectFilter": "extend"
},
"auth": "343baad4f88b4106b9b5961e77437688",
"id": 1
}
响应:
{
"jsonrpc": "2.0",
"result": [
{
"correlationid": "1",
"name": "Correlation 1",
"description": "",
"status": "0",
"filter": {
"evaltype": "0",
"formula": "",
"conditions": [
{
"type": "3",
"oldtag": "error",
"newtag": "ok",
"formulaid": "A"
}
],
"eval_formula": "A"
},
"operations": [
{
"type": "0"
}
]
}
],
"id": 1
}
ui/include/classes/api/services/CCorrelation.php 中的 CCorrelation::get()。