- Open , and select a POST request action from the dropdown.
- Enter or paste the Webhook URL you have saved.
-
Click the Header tab, and then add a header with the following:
- Key: API_KEY
- Value: Enter the API Key you have saved.
- Click the Body tab, and then add the events to be pushed.
-
Click Send to send your events to USM Anywhere. A confirmation message appears below. You may also open the Events page in USM Anywhere to verify that it has collected the events you have pushed.
Note: Alternatively, the API_KEY can be used as a URL parameter.
Pushing a single event
Refer to the curl command below to push a single event.As a URL parameter:curl --location '<base_url>/api/1.0/webhook/push' \--header 'API_KEY: <api_key>' \--header 'Content-Type: application/json' \--data '{"event": "value"}'
Pushing multiple events
You can push up to a maximum of 10,000 events in one go using JSON format. Refer to the curl command below to push multiple events.curl --location '<base_url>/api/1.0/webhook/push' \--header 'API_KEY: <api_key>' \--header 'Content-Type: application/json' \--data '[{"event1": "event1 value"},{"event2": "event2 value"},{"event3": "event3 value"}]'
Use the header “Content-Encoding: gzip” when sending a payload compressed as a gzip.
Note: When the API_KEY is included in the URL and in the HTTP Headers, the API_KEY value checked will be the header value. The URL parameter value and the header value must be equals.
Errors when pushing events
The following errors may occur when pushing events:- 400 Bad Request: This error occurs when you try to push events without providing events in the Body section.
- 404 Not Found: This error occurs when you try to push events without providing the correct API Key.