Versions Compared

Key

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

...

Parameters

namedescription
trigger_urlURL we will trigger a HTTP POST to upon firing the registered event. For example, "https://your-domain.com/callback".
event_idUnique event identifier. You can grab a list of possible subscription events from the get subscription types endpoint.
content_typeContent-type we will HTTP POST to your trigger URL. This can be either "application/x-www-form-urlencoded" or "application/json"
secretOptional secret that we will use to generate a HMAC hex digest of the payload. The digest will be included in the triggered requests "X-Hub-Signature" header.

Underline indicates required.

Sample

Code Block
titleRequest
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
titleResponse (201)
{
  "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": "simon.jackson@accelo.com",
        "name": "Simon Jackson",
        "id": 1
      },
      "user_id": 1,
      "user_deployment": "hq",
      "trigger_url": "http://your-domain.com/callback",
      "content_type": "application/x-www-form-urlencoded",
      "subscription_id": "583f4b8028dc59073860a6d1",
      "trigger_type": "update",
      "trigger_table": "task"
    }
  }
}

...