Github user justinleet commented on the issue:

    https://github.com/apache/metron/pull/824
  
    ## Patch neither alert and status
    Create a metaalerts and get the GUID for the following steps.
    
    ### Patch in new field
    ```
    /api/v1/update/patch
    
    curl -X PATCH --header 'Content-Type: application/json' --header 'Accept: 
*/*' -d '{
      "guid": "00eae5ba-6137-4601-ae3a-fbf0003e58e6",
      "index": "metaalert_index",
      "patch": [
        {
          "op": "add"
            , "path": "/name"
            , "value": "My new meta alert name"
        }
      ],
      "sensorType": "metaalert"
    }' 'http://node1:8082/api/v1/update/patch'
    ```
    
    ### Retrieve the meta alert and ensure it contains the new 'name' field
    ```
    /api/v1/search/findOne
    
    curl -X POST --header 'Content-Type: application/json' --header 'Accept: 
application/json' -d '{
      "guid": "00eae5ba-6137-4601-ae3a-fbf0003e58e6",
      "index": "metaalert_index",
      "sensorType": "metaalert"
    }' 'http://node1:8082/api/v1/search/findOne'
    ```



---

Reply via email to