Our webhook API sends an HTTP GET request to the URL you specify whenever a file is uploaded, downloaded, modified, renamed, copied, or deleted. Information about the operation is included in the request query string. The API is very easy to use and can be integrated by anyone with server-side programming knowledge.
We expect an HTTP
200 response code, so if we don’t receive one we will try the webhooks again a few times over the next 3 days. We will notify you by email if a failure persists beyond that period. You can test webhooks from the folder settings of any folder on your site by clicking the test button when adding a webhook.
Setting up a webhook
To set up a webhook, simply go to the folder settings of a folder you would like to assign a webhook to. From there go to Webhooks > Add new webhook, and enter your webhook URL and any backup URL(s). The first webhook URL is the primary URL where you would like us to send our HTTP request, and any backup URLs are redundant webhook URLs that will also be attempted. A webhook request will be considered successful if an HTTP
200 response code is received from either the primary URL or a redundant URL.
Explanation of the requests sent from the webhook API
Whenever any file or folder action occurs within a webhook-enabled folder, an HTTP GET request will be sent to your corresponding webhook URL within a few minutes of the operation happening and will include several URL parameters.
Make sure to reply with an HTTP
200 response code.
Request URL Parameter Reference
||Type of action that occurred. Will be one of the following:
||Interface where the action occurred. Will be one of the following:
||Path of the file that was operated on.|
||Timestamp of the action, format:
||Username that performed the action.|
||Indicates whether the action occurred on a
Troubleshooting webhook issues
The two most common problems with webhook deliverability are providing the wrong webhook URL, and the webhook endpoint not returning an HTTP
A third potential problem you could encounter is your webhook script timing out before BrickFTP receives the HTTP
200 response. Therefore, if your webhook script performs complex logic or other actions that take time to complete, you may want to have your webhook endpoint immediately return the HTTP
200 status code, and then perform the rest of its actions.
Expansion of the webhook API
Are there additional things you would like to see webhooks for?
We already have the capability to expose webhooks on request for creation/updates/deletes of users, groups, and permissions. We are willing to add more webhooks if there’s anything that would be useful for you.
Please feel free to contact us with any feature requests for the webhook API.