correlation.update

Description

object correlation.update(object/array correlations)

This method allows to update existing correlations.

This method is only available to Super admin user type. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Parameters

(object/array) Correlation properties to be updated.

The correlationid property must be defined for each correlation, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.

Additionally to the standard correlation properties, the method accepts the following parameters.

Parameter Type Description
filter object Correlation filter object to replace the current filter.
operations array Correlation operations to replace existing operations.

Return values

(object) Returns an object containing the IDs of the updated correlations under the correlationids property.

Examples

Disable correlation

Request:

{
           "jsonrpc": "2.0",
           "method": "correlation.update",
           "params": {
               "correlationid": "1",
               "status": "1"
           },
           "id": 1
       }
Copy
✔ Copied

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "correlationids": [
                   "1"
               ]
           },
           "id": 1
       }
Copy
✔ Copied

Replace conditions, but keep the evaluation method

Request:

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

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "correlationids": [
                   "1"
               ]
           },
           "id": 1
       }
Copy
✔ Copied

See also

Source

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

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.