[comment]: # aside: 1

[comment]: # translation:outdated

[comment]: # ({f1f8a413-e205e572})
# Correlationオブジェクト

次のオブジェクトは、`correlation`APIに直接関連しています。

[comment]: # ({/f1f8a413-e205e572})

[comment]: # ({ff956b80-935ba6ef})
### Correlation

Correlation オブジェクトは、以下のプロパティを持ちます。

|プロパティ|[Type](/manual/api/reference_commentary#data_types)|説明|
|--|--|------|
|correlationid|string|*(readonly)* ID of the correlation.|
|**name**<br>(required)|string|Name of the correlation.|
|description|string|Description of the correlation.|
|status|integer|Whether the correlation is enabled or disabled.<br><br>Possible values are:<br>0 - *(default)* enabled;<br>1 - disabled.|

[comment]: # ({/ff956b80-935ba6ef})

[comment]: # ({16284bc8-d12c2169})
### 相関オペレーション

相関操作オブジェクトは、相関が実行されたときに実行される操作を定義します。以下のプロパティを持ちます。

|プロパティ|[Type](/manual/api/reference_commentary#data_types)|説明|
|--|--|------|
|**type**<br>(required)|integer|Type of operation.<br><br>Possible values:<br>0 - close old events;<br>1 - close new event.|

[comment]: # ({/16284bc8-d12c2169})

[comment]: # ({2c6c5385-d0662dba})
### 相関フィルタ

相関フィルタオブジェクトは、設定された相関処理を実行するために満たす必要のある一連の条件を定義します。<br>
このオブジェクトには、次のプロパティがあります。

|プロパティ|[Type](/manual/api/reference_commentary#data_types)|説明|
|--|--|------|
|**evaltype**<br>(required)|integer|Filter condition evaluation method.<br><br>Possible values:<br>0 - and/or;<br>1 - and;<br>2 - or;<br>3 - custom expression.|
|**conditions**<br>(required)|array|Set of filter conditions to use for filtering results.|
|eval\_formula|string|*(readonly)* Generated expression that will be used for evaluating filter conditions. The expression contains IDs that reference specific filter conditions by its `formulaid`. The value of `eval_formula` is equal to the value of `formula` for filters with a custom expression.|
|formula|string|User-defined expression to be used for evaluating conditions of filters with a custom expression. The expression must contain IDs that reference specific filter conditions by its `formulaid`. The IDs used in the expression must exactly match the ones defined in the filter conditions: no condition can remain unused or omitted.<br><br>Required for custom expression filters.|

[comment]: # ({/2c6c5385-d0662dba})

[comment]: # ({f4518df0-72ee5420})
#### 相関フィルター条件

相関フィルタ条件オブジェクトは、相関処理を実行する前に確認する必要のある特定の条件を定義します。

|プロパティ|[Type](/manual/api/reference_commentary#data_types)|説明|
|--|--|------|
|**type**<br>(required)|integer|Type of condition.<br><br>Possible values:<br>0 - old event tag;<br>1 - new event tag;<br>2 - new event host group;<br>3 - event tag pair;<br>4 - old event tag value;<br>5 - new event tag value.|
|tag|string|Event tag (old or new). Required when type of condition is: 0, 1, 4, 5.|
|groupid|string|Host group ID. Required when type of condition is: 2.|
|oldtag|string|Old event tag. Required when type of condition is: 3.|
|newtag|string|Old event tag. Required when type of condition is: 3.|
|value|string|Event tag (old or new) value. Required when type of condition is: 4, 5.|
|formulaid|string|Arbitrary unique ID that is used to reference the condition from a custom expression. Can only contain capital-case letters. The ID must be defined by the user when modifying filter conditions, but will be generated anew when requesting them afterward.|
|operator|integer|Condition operator.<br><br>Required when type of condition is: 2, 4, 5.|

::: notetip
様々なタイプの式でフィルタを使用する方法を理解するために<br>
[correlation.get](get#retrieve_correlations) と [correlation.create](create#using_a_custom_expression_filter)  メソッドの例を参照してください。
:::

各条件タイプでサポートされる演算子および値は以下の通りです。

|条件|条件名|サポートされる演算子|想定する値|
|---------|--------------|-------------------|--------------|
|2|Host group|=, <>|Host group ID.|
|4|Old event tag value|=, <>, like, not like|string|
|5|New event tag value|=, <>, like, not like|string|

[comment]: # ({/f4518df0-72ee5420})
