Using application webhooks
Instead of pulling information from the API, it is also possible to use a webhook to get information pushed (posted) to a selected end point. So everytime an application is posted to one of your assignments, the specified end point will be called with a XML payload containing the application data.
To activate this:
1) Login to Brainville and go to https://www.brainville.com/Configuration/Developer
2) Add the URI you want to post data to when someone applies to one of your assignments. This URI must be using SSL (https)
3) Click on the "Generate secret" button to generate a key that will be sent as part of the authorization header when the end point is called.
It is strongly recommended that you use the webhook key included as a authorization bearer value to authenticate any webhook calls, by comparing the included bearer with the one you generated in step 3 above.
Request content
The content of the post to the endpoint is the same as specified in Find, but with the added element <Action>. <Action> specifies the trigger event for the webhook, and can have the following values:
1 - A new application was sent
2 - The rate of an existing application was changed
3 - New additions (files/comments) was added to an existing application
4 - The application was withdrawn
Expected response
If successful, your end point should respond to any webhook calls with HTTP Status 200 (OK). Any other status code will be interpreted by Brainville API as a failure on the end point side. The webhook call will then be retried until either HTTP Status 200 is returned or 3 failed attempts have been made.