This is a translation of the original English documentation page. Help us make it better.

correlation.get

説明

integer/array correlation.get(object parameters)

この方法では、与えられたパラメータに応じた相関関係を検索することができる。

このメソッドは、どのタイプのユーザーでも利用可能です。このメソッドを呼び出す許可は、ユーザーロール設定で
取り消すことができます。詳しくは User roles をご覧ください。

パラメータ

(object) 希望する出力を定義するパラメータ

このメソッドは、以下のパラメータをサポートしています。

パラメータ Type 説明
correlationids string/array Return only correlations with the given IDs.
selectFilter query Return a filter property with the correlation conditions.
selectOperations query Return an operations property with the correlation operations.
sortfield string/array Sort the result by the given properties.

Possible values are: correlationid, name and status.
countOutput boolean These parameters being common for all get methods are described in the reference commentary.
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) のどちらかを返します:

  • オブジェクトの配列
  • もし countOutput パラメータが使用されている場合は、取得したオブジェクトの数

相関関係を取得する

設定されたすべての相関を、相関条件とオペレーションとともに取得します。このフィルターは "and/or" 評価タイプを
使用するため、formula プロパティは空で、eval_formula が自動的に生成されます。

Request:

{
           "jsonrpc": "2.0",
           "method": "correlation.get",
           "params": {
               "output": "extend",
               "selectOperations": "extend",
               "selectFilter": "extend"
           },
           "auth": "343baad4f88b4106b9b5961e77437688",
           "id": 1
       }

Response:

{
           "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
       }

参照

ソース

CCorrelation::get() in ui/include/classes/api/services/CCorrelation.php.