To set up an Action that calls a REST endpoint, you fill first need to:
- Set up a REST Integration, and
- Create an organization or user Event View if you want to use a view other than the built in global views.
Setting up Actions for REST Endpoint
In this example, we are going to use the Global Event View Failed Scans, but you can apply this Action to any event view.
Navigate to the events page under Control > Events.
Locate the view you want to trigger the REST integration action from by clicking on Saved Views.
Here we are going to choose the Global View that logs failed scan events, called Failed Scans.
To create a new action, navigate to the Actions tab for the event view and then click Add Action.
Select Send a message to REST Endpoint
Give the action a name that helps describe what it is going to do. Select the REST integration you already configured to be able to interface with slack. For this particular integration with Slack, we also need to specify a particular request body, an example of which can be seen below.
Now that we have successfully set up the action, you will receive a message whenever a node has failed to scan.
This example used a Slack webhook via a REST integration as a proof-of-concept example. If you really want to integration with Slack with recommend using the Slack Integration instead.