Event Sinks
Event sinks are event alert destinations. You can create, read, update, and delete event sinks with the Scanner API.
Types of event sinks
We support two types of event sinks:
Slack - send event alerts to a Slack channel.
Webhook - send event alerts to a URL webhook.
Create a new event sink
POST
/v1/event_sink
Create a new event sink with the specified data.
Body
tenant_id
required
string
Unique identifier for the tenant
name
required
string
Name of the event sink
description
required
string
Description of the event sink
event_sink_args
required
Event sink details
Create event sink arguments
To create a Slack event sink, we need the channel ID and Slack OAuth code, e.g.
Note: the API still supports the channel
parameter (with a channel name), but channel
is deprecated in favor of channel_id
.
To create a webhook event sink, we need the url, e.g.
To create a PagerDuty event sink, we need the Events API V2 integration key, e.g.
Example
Response
Returns the newly created event sink.
List event sinks
GET
/v1/event_sink
List all event sinks for a tenant.
Query parameters
tenant_id
required
string
Unique identifier for the tenant
Example
Response
Returns a list of event sink objects.
Get an event sink
GET
/v1/event_sink/{id}
Get the event sink with the given id.
Example
Response
Returns the event sink object.
Update an event sink
PUT
/v1/event_sink/{id}
Update the event sink with the given id.
Body
id
required
string
Unique identifier for the event sink
name
string
Update the name of the event sink
description
string
Update the description of the event sink
event_sink_args
Update the event sink details
Update event sink arguments
To update a Slack event sink, we need the new channel ID, e.g.
Note: the API still supports the channel
parameter (with a channel name), but channel
is deprecated in favor of channel_id
.
To update a webhook event sink, we need the new url, e.g.
To update a PagerDuty event sink, we need the new Events API V2 integration key, e.g.
Example
Response
Returns the updated event sink object.
Delete an event sink
DELETE
/v1/event_sink/{id}
Delete the event sink with the given id.
Example
Response
Returns the id
and tenant_id
for the deleted event sink.
Last updated
Was this helpful?