Nouvola Blog

Nouvola Announces Availability of Webhooks to Augment API Capabilities

Posted by Product Update on Sep 14, 2017 4:39:16 PM

bigstock-Carabiner-On-A-Rope-188361934.jpg

Instant notification anyone? We believe in an API-centric world. Hence we are very excited to introduce Nouvola WebHooks, a very powerful yet simple mechanism for web communications that expands our API capabilities.

What is a Webhook?

A webhook lets a developer provide a URL to which an API will send data.

Sometimes people call webhooks web callbacks, but essentially a webhook lets you skip a step. With most APIs there is a request followed by a response. No request is required for a webhook, it just sends the data when they are available.

Specifically for Nouvola DiveCloud, it also removes the need to poll for test conclusion and results. DiveCloud will simply send results when they are ready. Pretty cool eh?

Using Nouvola Webhooks

To use a webhook, you need to provide a URL that is accessible from the outside world, so that it can be called back once execution is completed. This URL is where your application will accept the data and do something with it. To set up the webhook, you will register this URL with Nouvola DiveCloud, using a specialized API. When a test completes, the webhook will send it to your URL.

Advantages of Nouvola Webhooks

  1. No need for polling. The greatest advantage of using a webhook is that it removes the need for polling, which is resource intensive on both sides.
  2. Real-time use case. The second biggest advantage is that it enables a real-time use case. If you don’t know when a test ends or you’re running synthetic monitoring, you want to get the data as soon as they are available. Without a webhook, you may lose meaningful data.
  3. Downstream actions. Getting new and updated data also highlights another great use case for webhooks. If you run synthetic monitors and you want to take specific actions based on a change in certain metrics, you can get updated data with a webhook and have instantaneous integration with dashboard / downstream tools.

Nouvola WebHooks Examples

You first create a hook to register an event and resource by using the hooks API.

For example, the following call:

curl -X POST -H 'Content-Type: application/json' -H 'x-api: abc' -d '{"event":"run_plan","resource_id":"1234","url":"http://www.hi.com"}' https://divecloud.nouvola.com/api/v1/hooks

registers a hook to receive a callback when the specified test plan has completed the execution.

On successful hook registration, the response is the following json:

 {"result":"success"}

The callback contains json data in the body, in the format of:

 {"event":"run_plan","resource_id":1234,"status":"emailed","outcome":"success", shareable_link:"https://divecloud.nouvola.com/tests/4991?key=d3f7a58bab489028cc687d421b11ce"}

Once you receive this message you can use other APIs to retrieve more detailed results (see API - Results for more info).

Want to know more?

For additional details, see Nouvola Webhooks help.

Want to know more? Request a demo to get a live walk-through of the full range of APIs available with Nouvola DiveCloud, and try it out for yourself.

Here’s to even happier, more efficient performance testing with webhooks!

Sign Up

 

Topics: Product

Sign Up For Nouvola

Subscribe to Email Updates

Recent Posts