...
To register for a REST hook, you simply need to make a regular API request to the /resthooks endpoint, for example:
POST https://api.actionstep.com/api/rest/webhooksresthooks{ "resthooks": [ { "eventName" : "ActionCreated", "targetUrl" : "https://your-application-url.com/resthook-callbacks?callback_id=12345" } ] }RESPONSE:
HTTP/1.1 200 OK
{ "resthooks": [ { "id", "42", "eventName" : "ActionCreated", "targetUrl" : "https://your-application-url.com/resthook-callbacks?callback_id=12345", "triggeredCount": 0, .... } ] }
...
If you no long require a REST Hook, you can either notify actionstep by replying with a 401 HTTP status when we POST to your server (in which event we'll delete the rest hook) or you can perform a regular REST DELETE request, for example:
DELETE https://api.actionstep.com/api/rest/webhooksresthooks/42
Updating a REST Hook
If you need to update the REST Hook (to change the Target URL for example) you can do a regular PUT request, for example:
PUT https://api.actionstep.com/api/rest/webhooksresthooks/42{ "resthooks": [ { "id":"42", "eventName" : "ActionCreated", "targetUrl" : "https://your-application-url.com/some-other-resthook-callback-url?callback_id=12345" } ] }
...