Create event
Add a REST API event source in Enterprise Alert.
Let us say the API key is l1slfpjwirbm6twzs30bhtcl3z34m8v9 afterwards.
In this case you can create an event on your local command line like this:
curl "http://localhost/EAWebService/rest/events?apiKey=l1slfpjwirbm6twzs30bhtcl3z34m8v9" -L -k --data "{ 'UserName': 'Otto' }"
Let us assume the answer of EA is like this:
{"ExternalID":"8f3e3c21-58ca-4fb8-a68d-be33c9debea5" ...
Update event
Then you can update the event with this command:
curl "http://localhost/EAWebService/rest/events/8f3e3c21-58ca-4fb8-a68d-be33c9debea5/update?apiKey=l1slfpjwirbm6twzs30bhtcl3z34m8v9" -L -k --data "{ 'UserName': 'Hans' }"
Reset event (close alert)
And you can close the referring alert with this command:
curl "http://localhost/EAWebService/rest/events/8f3e3c21-58ca-4fb8-a68d-be33c9debea5/reset?apiKey=l1slfpjwirbm6twzs30bhtcl3z34m8v9" -L -k --data "{}"