ContinuityApp

Create a Notification

Notifications can be created for Builds and Dependencies. Notifications will trigger an event when something happens to the resource. At the moment we only support Webhooks, but we are actively working to integrate other notification handlers. Handlers are open source at GitHub, and you can contribute adding support to some particular service.

Auth&ACL

Both users and collaborators can access this API, via OAuth notifications scope (or HTTP Basic Authentication for development purposes).

Definition

POST https://v1.continuityapp.ws/projects/<project_id>/notifications

Arguments

Arguments    
notifiable_type Required Can be build or dependency, based on which kind of events you want to get notified for.
name Required Can be webhook. We are working to add more notifiers. Notifiers are open source, you can create your own!

Notification Specific Arguments

webhook options:

Webhook options    
options[url] Required The URL where the Webhook must POST the request to.

Example request

$ curl https://v1.continuityapp.ws/projects/123456789123456789/notifications?oauth_token=<access_token> \
    -d "notifiable_type=dependency&name=webhook&options[url]=http%3A%2F%2Fhooks.yourservice.com%2Fcontinuityapp" \
    -X POST This will let our notification system to trigger a Webhook to `http://hooks.yourservice.com/continuityapp` every time something happens to Project `123456789123456789` dependencies.

Returns

A notification object will be returned.

Example response

{
  "response": {
    "id": 123456789123456780,
    "id_str": "123456789123456780",
    "name": "webhook",
    "options": {
      "url": "http://hooks.yourservice.com/continuityapp"
    },
    "notifiable_type": "dependency"
  }
}

Notes

See open source Handlers at GitHub to understand the Webhooks (and other future handlers) format.

Errors

There are no specific errors for this API.

comments powered by Disqus