Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

Event IDDescription
assign_taskAny time a task assignee changes. This includes going from assigned to unassigned.
unassign_taskAny time a task is unassigned.
create_quoteAny time a new quote is created.
create_requestAny time a new request is created.
update_request_statusAny time a request status changes.

Payloads

Each event will bundle together a payload containing the details of what happens and a resource url pointing you where to go for more fields of the object affected.

...

HTTP requests sent to your registered payload urls will contain several special headers:

HeaderDescription
X-Accelo-EventID of the even that triggered the delivery. For example, "assign_task"
X-Hub-SignatureHMAC hex digest of the payload using your configured subscriptions secret.

API Endpoints

You can manage webhooks from the public api. This is particularly useful if you wish your integration to automatically manage subscriptions on behalf of authorized user.

List Subscriptions

Returns a list of webhook subscriptions for the current user.

Code Block
GET /api/v0/webhooks/subscriptions.{json|yml|xml}

Sample Response

Code Block
{
  "meta": {
    "message": "Everything executed as expected.",
    "more_info": "https://affinitylive.jira.com/wiki/display/APIS/Status+Codes#ok",
    "status": "ok"
  },
  "response": {
    "subscriptions": [
      {
        "trigger_table": "task",
        "trigger_type": "update",
        "subscription_id": "583e3c6328dc591a33139361",
        "content_type": "application/x-www-form-urlencoded",
        "trigger_url": "https://your-domain.com/callback",
        "user_deployment": "your-deployment",
        "user_id": 1,
        "event_id": "assign_task"
      }
    ],
    "subscriptions_users": [
      {
        "id": 1,
        "name": "Simon Jackson",
        "email": "simon.jackson@your-domain.com"
      }
    ]
  }
}

List Subscription Types

Returns an array of subscription events. Use this endpoint to grab a list of event ids.

Code Block
GET /api/v0/webhooks/subscriptions/types.{json|yml|xml}


Sample Response

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"
      }
    ]
  }
}