...
Only pro users and up can utilise webhooks. This doesn't mean other users cannot register them on behalf but webhooks will only fire on objects the owner of the object has view access to. For example, If Alice registers to receive notifications whenever a task assignee changes. She will not receive notifications for any tasks she cannot view from within Accelo.
Limitations
We do not limit the amount of webhooks per deployment or user but we do enforce a 10 second timeout rule. If your trigger url takes more than 10 seconds to respond to webhook delivery, we will cancel the request. If this occurs too many times, we will delete your webhook subscription automatically.
Events
When subscribing to webhooks you choose an event that you would like to receive payloads for. Each event corresponds to a certain set of actions on a per object basis. The available events are:
...
Code Block |
---|
{
"meta": {
"message": "Everything executed as expected.",
"more_info": "https://affinitylive.jira.com/wiki/display/APIS/Status+Codes#ok",
"status": "ok"
},
"response": {
"types": [
{
"trigger_table": "task",
"event_title": "Task assigned",
"event_id": "assign_task",
"trigger_type": "update"
},
{
"trigger_type": "update",
"event_id": "unassign_task",
"trigger_table": "task",
"event_title": "Task unassigned"
},
{
"event_title": "Quote created",
"trigger_table": "quote",
"event_id": "create_quote",
"trigger_type": "create"
},
{
"trigger_type": "create",
"event_id": "create_request",
"event_title": "Request created",
"trigger_table": "request"
},
{
"trigger_type": "update",
"event_id": "update_request_status",
"event_title": "Request status changed",
"trigger_table": "request"
}
]
}
} |
Create Webhook Subscription
Creates and returns a new webhook subscription.
Code Block |
---|
POST /api/v0/webhooks/subscriptions.{json|xml|yml} |
Parameters
name | description |
---|
trigger_url | URL we will trigger a HTTP POST to upon firing the registered event. For example, "https://your-domain.com/callback". |
event_id | Unique event identifier. You can grab a list of possible subscription events from the get subscription types endpoint. |
Sample Response
Code Block |
---|
|
POST /api/v0/webhooks/subscriptions HTTP/1.1
Host: your-deployment.api.accelo.com
Content-Type: application/json
{
"trigger_url": "https://your-domain.com/callback",
"event_id": "assign_task"
} |
Code Block |
---|
|
{
"meta": {
"status": "ok_created",
"more_info": "https://affinitylive.jira.com/wiki/display/APIS/Status+Codes#ok_created",
"message": "A resource was successfully created."
},
"response": {
"subscription": {
"event_id": "assign_task",
"user": {
"email": "support_user@accelo.com",
"name": "Accelo Support",
"id": 1
},
"user_id": 1,
"user_deployment": "hq",
"trigger_url": "http://google.com/asda/asd",
"content_type": "application/x-www-form-urlencoded",
"subscription_id": "583f4b8028dc59073860a6d1",
"trigger_type": "update",
"trigger_table": "task"
}
}
} |