Configuration
To start using the webhook service, an HTTPS endpoint should be created. The endpoint could be an IP address or a domain name. Depending on customers network security - it is possible that the source IPs should be whitelisted. The following IPs will forward data to the customers webhook endpoint(s):
- 52.29.71.11
- 18.157.211.95
Webhook Configuration via API
Webhook Creation
- On webhook creation, state value is not mandatory, but it can be set to
ENABLED
to immediately start using the webhook. If state is not provided then webhook will be disabled by default. - Headers object in the request body should contain authorization and configuration headers that are expected by the customer's endpoint.
Example:
curl --location --request POST 'https://api.1nce.com/management-api/v1/rules/webhooks' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "webhook-name-1",
"url": "https://www.your-endpoint.com/messages1",
"headers": {"x-api-key": "ABCDEFGHIJKLMNOPQRSTUVWXYZ"},
"eventTypes": ["DATA_BROKER"],
"state": "ENABLED"
}'
Get Webhooks Details
curl --location --request GET 'https://api.1nce.com/management-api/v1/rules/webhooks'
Response Example:
{
"items": [
{
"id": "hNoX81kg4R_aJBmxp1Bhr",
"name": "updated-webhook-name",
"url": "https://www.your-endpoint.com/messages",
"headers": {
"x-api-key": "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
"eventTypes": [
"DATA_BROKER"
],
"state": "ENABLED",
"createdTime": "2022-04-28T13:11:40.051Z",
"updatedTime": "2022-04-29T06:35:36.541Z"
},
{
"id": "Bdu4JhRi_zs-37M1gVamY",
"name": "webhook-name-1",
"url": "https://www.your-endpoint.com/messages1",
"headers": {
"x-api-key": "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
"eventTypes": [
"DATA_BROKER"
],
"state": "ENABLED",
"createdTime": "2022-04-28T13:13:28.652Z",
"updatedTime": "2022-04-28T13:13:28.652Z"
}
]
}
Webhook Edit and Restart
curl --location --request PATCH 'https://api.1nce.com/management-api/v1/rules/webhooks/hNoX81kg4R_aJBmxp1Bhr' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "updated-webhook-name"
}'
After 5 unsuccessful message attempts webhook will be set to state failed
. To restart the webhook:
curl --location --request PATCH 'https://api.1nce.com/management-api/v1/rules/webhooks/hNoX81kg4R_aJBmxp1Bhr' \
--header 'Content-Type: application/json' \
--data-raw '{
"state": "ENABLED"
}'
Webhook testing
curl --location --request POST 'https://api.1nce.com/management-api/v1/rules/webhooks/hNoX81kg4R_aJBmxp1Bhr/test' \
--header 'Content-Type: application/json' \
--data-raw '{
"eventType": "DATA_BROKER"
}'
Updated 18 days ago
Did this page help you?