integer/array correlation.get(object parameters)
此方法允许根据给定的参数检索关联。
此方法对于任何用户可用。可以在用户角色设置中撤销调用该方法的权限。更多信息请查看 用户角色。
(object) 定义需要输出的参数。
此方法支持以下参数。
| 参数 | 类型 | 说明 | 
|---|---|---|
| correlationids | string/array | 仅返回给定 ID 的关联。 | 
| selectFilter | query | 返回带有关联条件的过滤属性。 | 
| selectOperations | query | 返回带有关联操作的操作 属性。 | 
| sortfield | string/array | 按照给定属性对结果进行排序。 可用值: correlationid,name和status。 | 
| countOutput | boolean | 这些参数对于所有get方法都是通用的,详情请参考参考说明。 | 
| editable | boolean | |
| excludeSearch | boolean | |
| filter | object | |
| limit | integer | |
| output | query | |
| preservekeys | boolean | |
| search | object | |
| searchByAny | boolean | |
| searchWildcardsEnabled | boolean | |
| sortorder | string/array | |
| startSearch | boolean | 
(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()。