[comment]: # ({c71a2e54-c71a2e54})
# correlation.update

[comment]: # ({/c71a2e54-c71a2e54})

[comment]: # ({277763f5-b9562236})
### 説明

`object correlation.update(object/array correlations)`

このメソッドは、既存の相関関係を更新することができます。

::: noteclassic
このメソッドは、*Super admin*タイプのユーザーのみ利用可能です。メソッドを呼び出す権限は、ユーザーの役割の設定で取り消すことができます。詳細は[ユーザーの役割](/manual/web_interface/frontend_sections/users/user_roles)を参照してください。
:::

[comment]: # ({/277763f5-b9562236})

[comment]: # ({97b738cd-326bc80e})
### パラメータ

`(object/array)` 更新する相関関係のプロパティ。

各相関関係について `correlationid` プロパティを定義する必要があり、
その他のプロパティはすべて任意です。渡されたプロパティのみが
更新され、その他はすべて変更されません。

このメソッドは、[標準の相関関係
プロパティ](object#correlation)に加えて、以下の
パラメータを受け付けます。

|パラメータ|[Type](/manual/api/reference_commentary#data-types)|説明|
|--|--|------|
|filter|object|現在のフィルターを置き換えるための[相関関係フィルター](/manual/api/reference/correlation/object#correlation-filter)オブジェクト。|
|operations|array|既存の操作を置き換える[相関関係の操作](/manual/api/reference/correlation/object#correlation-operation)。|

[comment]: # ({/97b738cd-326bc80e})

[comment]: # ({13e1dc13-13e1dc13})
### 戻り値

`(object)` correlationids`プロパティの下で更新された相関関係IDを含むオブジェクトを返します。

[comment]: # ({/13e1dc13-13e1dc13})

[comment]: # ({b41637d2-b41637d2})
### 例

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({801b5d8b-67bb2dfb})
#### 相関関係の無効化

[リクエスト](/manual/api#performing-requests):

```json
{
    "jsonrpc": "2.0",
    "method": "correlation.update",
    "params": {
        "correlationid": "1",
        "status": "1"
    },
    "id": 1
}
```

レスポンス:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "correlationids": [
            "1"
        ]
    },
    "id": 1
}
```

[comment]: # ({/801b5d8b-67bb2dfb})

[comment]: # ({df1d1004-d6ef1778})
#### 評価方法を維持したままで条件の置き換え

[リクエスト](/manual/api#performing-requests):

```json
{
    "jsonrpc": "2.0",
    "method": "correlation.update",
    "params": {
        "correlationid": "1",
        "filter": {
            "conditions": [
                {
                    "type": 3,
                    "oldtag": "error",
                    "newtag": "ok"
                }
            ]
        }
    },
    "id": 1
}
```

レスポンス:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "correlationids": [
            "1"
        ]
    },
    "id": 1
}
```

[comment]: # ({/df1d1004-d6ef1778})

[comment]: # ({1341f8b4-e7d15410})
### 関連項目

-   [相関フィルター](object#correlation-filter)
-   [相関操作](object#correlation-operation)

[comment]: # ({/1341f8b4-e7d15410})

[comment]: # ({40fa665f-40fa665f})
### ソース

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

[comment]: # ({/40fa665f-40fa665f})
