Get our latest book on "Top 10 artificial intelligence myths."
Download

Last updated

March 3, 2021

Table of contents

Connect webhooks with Impira

There are lots of ways to interact with your data in Impira. You can export your data via CSV, access data through API and IQL, or you can make a webhook connection.

What’s a webhook?

A webhook is a user-defined HTTP callback that enables you to create a real-time conversation between a client and a server whenever a data event occurs. In other words, by setting up a webhook with Impira, you’re asking Impira (the “client”) to let you (the “server”) know about any updates or changes to your dataset. You provide Impira with a way to reach you (via a unique webhook URL) whenever a new data event occurs. By having a webhook instantly “push” new data over to you means you won’t have to check for updates yourself — you let the updates come to you. 

Okay, let’s get webhooked

If your receiving application allows for webhooks, find that application’s unique webhook URL.

NOTE: This URL’s location may be different from the one used in this guide.

1. Have your unique webhook URL handy by copying it to your clipboard. 



2. Go to Impira and select your collection.

3. Click the drop-down arrow next to the collection’s name (right below the search bar) and select Configure automations.



4. Click + on the right side, beside Destinations and select Webhook.

5. Paste in your webhook URL and choose Submit

And you’re done. With just a few steps, you’ve linked Impira with your receiving application by creating a webhook. Any time you add files or make changes to the data in this collection, Impira will run an API request and send updates to the URL you provided. 

Checking on your webhook

Any time you want to see the status of any recently run webhooks, go to Configure automations (see step 3) and select View next to your webhook. This is a good way to check when the last time a webhook was run or if there were any errors, etc.



Secure webhooks

Impira allows you to specify an optional secure token when you create a webhook. This token is used to sign your webhook, so you can validate its integrity when you receive it. If you enable secure webhooks, the HTTP request will contain a header called `impira-signature` which is a SHA-256 HMAC signature of the webhook and your key.

The following python sample code illustrates how to validate the integrity of the signature:

```language=python
import hmac
import hashlib
signature = hmac.new(secure_token.encode(), response_body.encode(), hashlib.sha256).hexdigest()
```

Where `secure_token` is the token you enter into the Impira UI and `response_body` is the body of the webhook itself. This `signature` should match the `impira-signature` value you receive in the webhook request.

Stay in the loop

Get our Release Notes hot off the press, straight into your inbox.

Need more help?

Talk to someone