Webhooks

Nirmata provides a Webhooks for easy integration with any web service. Webhooks can be used to be notified when an application lifecycle event occurs.

Currently, webhooks are supported for the following events:
  • Environment post deploy - triggered once all services in the environment are deployed and running
  • Environment post delete - triggered when the environment, including all services, has been deleted

Setup

Webhooks can be created for each application.

For each webhook, the user can specify the following:
  • URL - the URL to be called
  • Application - the application that the webhook is being created for
  • Events - the events that should trigger the webhook. Multiple events can be selected
  • Enable - enable or disable the webhook
  • Secret - optional secret that will be used to compute the HMAC hex digest of the body and passed in HTTP requests as ‘X-Nirmata-Signature’ header.

Webhook request/response

Once the webhook is setup, Nirmata SaaS will issue a HTTP(S) POST request to the URL specified every time that event occurs.

Request:

POST /17ls5j11
Host: my.webhook-server.com
Connection: keep-alive
Content-Length: 0
Cache-Control: no-cache
Accept: application/json

{ "id":"9999",
  "triggerEvent":"environment-deploy",
  "applicationName":"Nirmata Demo",
  "applicationId":"54ce9479-0092-4fa9-97e1-2c36413b192d",
  "environmentName":"Staging",
  "url":"http://my.webhook-server.com/17ls5j11",
  "environmentId":"edb5d0e1-aada-4086-b2a7-06371dcf1706"
 }

Response:

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8

The webhook server/receiver should return a valid HTTP status code e.g. 200 OK - if successful, 40x, 50x in case of error