Webhooks

You can use the webhook resource to subscribe to notifications for events on your Rack.

Resource Creation

$ convox resources create webhook --url http://example.org
Creating webhook-9344 (webhook)... CREATING

Additional Options

OptionDescription
--name=<name>The name of the resource to create

Resource Events

All events are sent as POST requests with a content type of application/json.

All payloads have the following structure:

{
  "action": "object:action",
  "status": "success|error",
  "timestamp": "0000-00-00T00:00:00.000000000Z",
  "data": {
    "name": "value"
  },
}

For example, a release promotion on the app example-app would look like this:

{
  "action": "app:promote",
  "status": "success",
  "timestamp": "2015-10-28T03:46:24.106682533Z",
  "data": {
    "rack": "example-rack",
    "app": "example-app",
    "id": "R123456789"
  }
}

When the status is error, the data attribute will have a message available.

{
  "action": "app:promote",
  "status": "error",
  "timestamp": "2015-10-28T03:46:24.106682533Z",
  "data": {
    "rack":"example-rack",
    "app": "example-app",
    "id": "R123456789",
    "message": "unable to load release"
  }
}

Available Events

Action Data
app:create rack, name
app:delete rack, name
build:create rack, id, app
release:promote rack, id, app
release:create rack, id, app
service:create rack, id, app
service:delete rack, type, name
system:update rack

Resource Deletion

To delete the resource, use the convox resources delete command:

$ convox resources delete webhook-9344
Deleting webhook-9344... DELETING