Creating a notification webhook
Notification webhooks are external API calls that you use to send data to a third party when specific events occur.
About this task
You can configure the request URL of the external API that you want to start and add any headers of parameters that are required for starting the request URL. For information about event payloads, see Event types and payloads.
Within the webhook configuration JSON, a property
notification
exists. This property is a nested JSON object that contains all of the
notification-specific configuration options. The interests
property is defined
within this notification
object. When an event is raised, it is checked against
each element in the interests
property. If any element in the
interests
property evaluates to a match, the event is sent to the webhook
destination. Interests are checked in order, so in high-performance use cases, put the broadest
match first.
An interest consists of two fields, a friendly name
and a list
of clauses
. These clauses decide whether the interest is a match or not. The
clauses are joined with an AND
operation, and only if they all match the interest
is satisfied. A clause consists of three fields:
key
value
operation
- valid values areinclude
andexclude
.
data.action
. The value is the expected value of the field that is being inspected.
The operation indicates whether a match on this clause causes the event to be included or
excluded.For example, when authentication events are the key interest, but you want to filter out authentications that occur through federation, use these clauses:
Key:
event_type
, Value:authentication
, Operation:include
Key:
data.subtype
, Value:federation
, Operation:exclude
These clauses become the logical evaluation:
event_type
IS
authentication
AND
data.subtype
IS NOT
federation
.
For more information, see Notification webhooks.