correlation.update

Description

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

This method allows to update existing correlations.

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.

ParameterTypeDescription
filterobjectCorrelation filter object to replace the current filter.
operationsarrayCorrelation 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:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "correlation.update",
  4. "params": {
  5. "correlationid": "1",
  6. "status": "1"
  7. },
  8. "auth": "343baad4f88b4106b9b5961e77437688",
  9. "id": 1
  10. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "correlationids": [
  5. "1"
  6. ]
  7. },
  8. "id": 1
  9. }

Replace conditions, but keep the evaluation method

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "correlation.update",
  4. "params": {
  5. "correlationid": "1",
  6. "filter": {
  7. "conditions": [
  8. {
  9. "type": 3,
  10. "oldtag": "error",
  11. "newtag": "ok"
  12. }
  13. ]
  14. }
  15. },
  16. "auth": "343baad4f88b4106b9b5961e77437688",
  17. "id": 1
  18. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "correlationids": [
  5. "1"
  6. ]
  7. },
  8. "id": 1
  9. }

See also

Source

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