Web Hooks¶
Web hooks enable the ability to receive real-time updates from ReadyCloud. You can register a URL to which ReadyCloud will post all changes for a specified object type.
Register a new web hook¶
To register a new web hook you should create it by POSTing to the appropriate WebHook API resource entity. More information is available in the WebHook API resource documentation - Webhooks Resource.
Receive updates¶
After registering a web hook, ReadyCloud will use your URL as a REST API endpoint. The resource described by your URL should support two methods: PUT and DELETE. ReadyCloud will send a PUT request to <your_url>/<new_object_id> for new and updated objects. The body of this request will contain the same JSON as if you performed a GET request for the object which is the subject of the notification. ReadyCloud will send a DELETE request to <your_url>/<object_id> if the object is deleted.
Authentication¶
When you register a web hook ReadyCloud will return a token in the response. This token will subsequently reappear in the HTTP_AUTH header of each request made by ReadyCloud to your web hook receiving URL. This way you can verify that the request is really coming from ReadyCloud.