Webhooks
Getting started with Webhooks is super easy!
- Head over to the Destinations page.
- Under Webhook, click
Add New
.
- Enter
Name
. - Enter
Webhook URL
(only the POST method is supported). - Add any additional HTTP headers.
- You can use the following JSON payload or make changes as per your needs:
{
"detectionRuleId": "$DETECTION_RULE_ID",
"detectionRuleName": "$DETECTION_RULE_NAME",
"detectionRuleLink": "$DETECTION_RULE_LINK",
"severity": "$SEVERITY",
"tags": "$TAGS",
"queryUrl": "$QUERY_LINK",
"eventType": "$EVENT_TYPE",
"eventTimestamp": "$EVENT_TIME",
"scanTimeTsStart": "$SCAN_START_TIME",
"scanTimeTsEnd": "$SCAN_END_TIME",
"matchingEvents": "$MATCHING_EVENTS",
"matchCriteria": {
"condition": "$CONDITION"
},
"notificationRuleId": "$NOTIFICATION_RULE_ID",
"notificationRuleName": "$NOTIFICATION_RULE_NAME",
"notificationRuleLink": "$NOTIFICATION_RULE_LINK",
"webhookId": "$WEBHOOK_NOTIFICATION_ID",
"webhookName": "$WEBHOOK_NOTIFICATION_NAME"
}
- Click on the
Test
button to make sure the webhook url is valid and meets our url requirements. A dummy payload will be sent to the webhook url. - Upon successful validation, the
Test
button will becomeSave
. - Upon clicking
Save
button, the webhook will be saved.
Want to switch back to the default request body instead of using a custom one?
Click on Use Default
link next to Request body label. This will set your request body content to default request body.
Another way to test your webhook anytime
You can simply click the Test
button under the Webhooks section of the Destinations page.
The test payload is always a dummy payload.