A Graze API POST request that adds and merges custom information for a specified alert.
Back to Graze API EndPoint Reference.
Endpoint addAlertCustomInfo
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | Alert ID. |
| JSON object | Yes | A JSON object containing the custom information. |
Endpoint addAlertCustomInfo
returns the following response:
The behavior of this endpoint depends on whether the relevant alert or Situation is open, closed and still in the active database, or closed and archived to the historic database. This endpoint updates the alert or Situation as follows:
See API Update Behavior for more information on Situation statuses.
The following examples demonstrate typical use of endpoint addAlertCustomInfo
:
Example cURL request to add custom info to "field1", "field2", "field3", and "field4" in alert ID 9:
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/addAlertCustomInfo" -H "Content-Type: application/json; charset=UTF-8" -d '{"alert_id" : 9, "custom_info" : { "field1" : "value1" , "field2" : "value2" , "field3" : ["item1","item2","item3"] , "field4" : {"field4-1" : "value4-1","field4-2" : "value4-2"} }}'