WebHooks
The most flexible way to integrate (almost) anything with WildJar
It's pretty convoluted, but once you get it, it's damn easy, just a lil bit too flexible maybe!
API endpoint and methods:
GET | /v2/hook |
List pre-existing WebHooks |
GET | /v2/hook/$UUID |
Details for a specific WebHook |
PUT | /v2/hook |
Create a new WebHook |
POST | /v2/hook/$UUID |
Modify an existing WebHook |
DELETE | /v2/hook/$UUID |
Delete an existing WebHook |
So far nothing new, correct 😅
Hook Configuration example:
{
"uuid": "00000000-fe15-4d27-836f-6b22b46c8fcc",
"account": 00001,
"name": "Example Hook",
"template": "none",
"allow": "strict",
"apply": "all",
"direction": "inbound",
"push": {
"url": "https:\/\/my-endpoint.io\/from-wildjar",
"method": "POST",
"dataFormat": "json",
"data": {
"call-uuid": ""
},
"headers": {
"Content-Type": "application/json"
},
"retry": 3,
"interval": 60
},
"reply": {
"statusCode": 200,
"textMatch":"success"
},
"match": [
{
"fieldName":"event",
"operator":"EQUAL",
"value":"completed"
},
{
"fieldName":"duration",
"operator":"GREATER",
"value":"25"
},
],
"auth": null,
"oAuth": null
}
const ConditionOperators = {
EQUAL:'EQUAL',
NOTEQUAL:'NOTEQUAL',
GREATER:'GREATER',
SMALLER:'SMALLER',
IN:'IN',
NOTIN:'NOTIN',
ISDEFINED:'ISDEFINED',
};