Introduction
A webhook is a method of augmenting the behavior of a service with custom callbacks, which may be maintained, modified, and managed by Appery.io users. Simply speaking, it’s an HTTP POST that occurs when an event occurs.
Currently, Appery.io supports two categories of webhooks. Each category contains its own events:
Project webhooks:
- App version created.
- App version removed.
- App version restored.
- App published on Appery.io.
- Android build success.
- Android build failure.
- Android build abort.
- Android build start.
- iOS build success.
- iOS build failure.
- iOS build abort.
- iOS build start.
- App test.
Account webhooks:
- App created.
- App removed.
- App renamed.
For example, let’s say a system needs to be notified when the Android build is successful for a particular app. You would use an Android build success event. When the build is successful, a POST request will be invoked to the URL you specify.
Creating and attaching webhooks
1. Create a callback to collect and inspect webhooks. You can use a RequestBin service, or any URL you have for this purpose.
2. To register the URL as a webhook in Appery.io, open your Resources tab, switch to Webhooks, and click “Create new webhook”:
3. Enter the webhook parameters, and click “Create”:
A list of webhooks appears in the tab. Any line can be edited or deleted:
4. To attach the Account webhooks, choose the needed webhook and events. If successful, you will see a message:
5. To manage permissions to your webhooks, go to Permissions tab. Information on Appery.io team and resource security model can be found here.
6. To attach a Project webhook to your app, open the Apps tab, select the project, and scroll down to the Webhooks section:
7. Click “Attach Webhook.” In the popup, choose the webhook, check all the events you need, and click “Attach”:
8. The specified webhook appears in the area. It can be configured or deleted at any time:
When any of the checked events occur, your app POSTs data to the specified URL:
If the callback is unavailable, the webhook call is postponed and attempted several times during the following 24 hours, after which, if it’s unsuccessful, it will be deleted. The webhook call history isn’t stored.
Using several Webhooks
You can specify different event notifications to be sent to different URLs:
1. Open your Resources section, switch to Webhooks tab, and create several webhooks:
2. When attaching webhooks to your project, under Apps, check only the events with the data you need to be posted to the selected URLs:
3. The same events can be checked for different webhooks, which means that event notifications will be posted to several URLs. If every event is selected for a webhook, “Attach Webhook” becomes grayed-out:
POST payload information
When any of the following events occur, the Appery.io app POSTs data to the webhook. In this document, you’ll find the payload examples of every webhook call.
Project webhooks
App version created
Event ID: PROJECT_VERSION_CREATE.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
{ "project": { "guid": "372f4a93-e8ce-46ac-a111-44b6c3f476f4", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2013-11-27T05:08:26-08:00", "edited_at": "2013-11-29T08:06:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "version": { "name": "v1.0.0", "created_at": "2014-01-20T05:08:26-08:00", "author": { "name": "My Name", "email": "mymail@example.com" } }, "created_at": "2014-01-20T05:08:26-08:00", "created_by": { "name": "Someone's name", "email": "someone@mail.com" } } |
The RequestBin shows the following webhook:
App version restored
Event ID: PROJECT_VERSION_RESTORE.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
{ "project": { "guid": "372f4a93-e8ce-46ac-a111-44b6c3f476f4", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2013-11-27T05:08:26-08:00", "edited_at": "2013-11-29T08:06:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "version": { "name": "v1.0.0", "created_at": "2014-01-20T05:08:26-08:00", "author": { "name": "My Name", "email": "mymail@example.com" } }, "restored_at": "2014-01-20T05:08:26-08:00", "restored_by": { "name": "Someone's name", "email": "someone@mail.com" } } |
The RequestBin shows the following webhook:
App version removed
Event ID: PROJECT_VERSION_REMOVE.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
{ "project": { "guid": "372f4a93-e8ce-46ac-a111-44b6c3f476f4", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2013-11-27T05:08:26-08:00", "edited_at": "2013-11-29T08:06:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "version": { "name": "v1.0.0", "created_at": "2014-01-20T05:08:26-08:00", "author": { "name": "My Name", "email": "mymail@example.com" } }, "removed_at": "2014-02-20T05:08:26-08:00", "removed_by": { "name": "Someone's name", "email": "someone@mail.com" } } |
The RequestBin shows the following webhook:
Published on Appery.io success
Event ID: PROJECT_PUBLISH_APPERY_SUCCESS.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
{ "project": { "guid": "04018fec-ba49-4776-bf2e-60ac046f1683", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2014-01-15T05:08:26-08:00", "edited_at": "2014-01-17T08:06:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "hosting": { "published_at": "2013-11-30T05:08:26-08:00", "type": "appery.io", "url": "http://abc8821.app.appery.io", "publisher": { "name": "My Name", "email": "mymail@example.com" } } } |
The RequestBin shows the following webhook:
Android binary build start
Event ID: PROJECT_BUILD_ANDROID_START.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
{ "project": { "guid": "372f4a93-e8ce-46ac-a111-44b6c3f476f4", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2013-11-27T05:08:26-08:00", "edited_at": "2013-11-29T08:26:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "build": { "started_at": "2013-11-30T05:08:26-08:00", "finished_at": null, "status": "started", "platform": "android", "file_url": null, "initiator": { "name": "My Name", "email": "mymail@example.com" } } } |
The RequestBin shows the following webhook:
Android binary build success
Event ID: PROJECT_BUILD_ANDROID_SUCCESS.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
{ "project": { "guid": "04018fec-ba49-4776-bf2e-60ac046f1683", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2014-01-15T05:08:26-08:00", "edited_at": "2014-01-17T08:06:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "build": { "finished_at": "2014-01-17T05:09:29-08:00", "status": "success", "platform": "android", "file_url": "https://appery.io/app/rest/build/result/127137-android/1/My_project-1.1.apk", "initiator": { "name": "My Name", "email": "mymail@example.com" } } } |
The RequestBin shows the following webhook:
Android binary build abort
Event ID: PROJECT_BUILD_ANDROID_ABORT.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
{ "project": { "guid": "372f4a93-e8ce-46ac-a111-44b6c3f476f4", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2013-11-27T05:08:26-08:00", "edited_at": "2013-11-29T08:26:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "build": { "started_at": "2013-11-30T05:08:26-08:00", "finished_at": "2013-11-30T05:09:29-08:00", "status": "aborted", "platform": "android", "file_url": null, "initiator": { "name": "My Name", "email": "mymail@example.com" } } } |
Android binary build fail
Event ID: PROJECT_BUILD_ANDROID_FAIL.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
{ "project": { "guid": "372f4a93-e8ce-46ac-a111-44b6c3f476f4", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2013-11-27T05:08:26-08:00", "edited_at": "2013-11-29T08:26:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "build": { "started_at": "2013-11-30T05:08:26-08:00", "finished_at": "2013-11-30T05:09:29-08:00", "status": "failed", "platform": "android", "file_url": null, "initiator": { "name": "My Name", "email": "mymail@example.com" } } } |
The RequestBin shows the following webhook:
iOS binary build start
Event ID: PROJECT_BUILD_IOS_START.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
{ "project": { "guid": "372f4a93-e8ce-46ac-a111-44b6c3f476f4", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2013-11-27T05:08:26-08:00", "edited_at": "2013-11-29T08:26:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "build": { "started_at": "2013-11-30T05:07:26-08:00", "finished_at": null, "status": "started", "platform": "ios", "file_url": null, "initiator": { "name": "My Name", "email": "mymail@example.com" } } } |
The RequestBin shows the following webhook:
iOS binary build success
Event ID: PROJECT_BUILD_IOS_SUCCESS.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
{ "project": { "guid": "04018fec-ba49-4776-bf2e-60ac046f1683", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2014-01-15T05:08:26-08:00", "edited_at": "2014-01-17T08:06:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "build": { "finished_at": "2014-01-17T05:09:29-08:00", "status": "success", "platform": "ios", "file_url": "https://appery.io/app/rest/build/result/127137-android/1/My_project.ipa", "initiator": { "name": "My Name", "email": "mymail@example.com" } } } |
The RequestBin shows the following webhook:
iOS binary build fail
Event ID: PROJECT_BUILD_IOS_FAIL.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
{ "project": { "guid": "372f4a93-e8ce-46ac-a111-44b6c3f476f4", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2013-11-27T05:08:26-08:00", "edited_at": "2013-11-29T08:26:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "build": { "started_at": "2013-11-30T05:07:26-08:00", "finished_at": "2013-11-30T05:08:06-08:00", "status": "failed", "platform": "ios", "file_url": null, "initiator": { "name": "My Name", "email": "mymail@example.com" } } } |
The RequestBin shows the following webhook:
Project preview test
Event ID: PROJECT_PREVIEW_TEST.
Webhook payload example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
{ "project": { "guid": "372f4a93-e8ce-46ac-a111-44b6c3f476f4", "name": "My project", "description": "My one and only project for testing hooks", "created_at": "2013-11-27T05:08:26-08:00", "edited_at": "2013-11-29T08:26:46-08:00", "owner": { "name": "My Name", "email": "mymail@example.com" } }, "preview": { "tested_at": "2013-11-30T05:07:26-08:00", "tested_by": { "name": "My Name", "email": "mymail@example.com" } } } |
The RequestBin shows the following webhook: