As part of Vizlib Actions, our API Integration action lets you create a custom connection to a REST API of your choosing. This is an extremely powerful feature best set up by an experienced user or developer. Here's some ways we use it at Vizlib:
- Sharing data from Qlik Sense into Slack
- Tagging groups of features requests to move into development
- Sharing data via email
- Retrieving real-time metrics (before scheduled reloads)
TABLE OF CONTENTS
- Getting started with API Integration using Zapier
- Possible Limitations
Getting started with API Integration using Zapier
Check out our how-to video, with 5 easy steps to get started with API Integration. For those of you more familiar with APIs do read the known limitations. For those getting started with Zapier, everything is plug and play. Please note this requires a Zapier account and the premium package if you want to use webhooks. Other similar services are available.
Parameters help define further instructions to your request. These are well explained here.
Typical URL containing a query string is as follow. The parameter "name" has a value of "ferret"
Use this section if your API endpoint requires the following:
- API Key/Secret
- username/ID & password
Do not delete the header for authorization since this is automatically added upon entering details in the authorization tab. Limited headers are supported in browser-based REST API communications.
Some requests support a text or JSON body. We allow an expression to be used (please beware you will need to use 3rd-party tools to validate JSON when this is an expression). using expressions means that a custom body can be used to drive a request, this can be driven by variables or selections, enabling you to provide end-users with a fast, bespoke and pain-free connection to other web services from within Qlik Sense. This could be updating other systems or sharing data via messaging tools like slack.
Many APIs will require to suppress content-type, since specifying certain headers is not allowed in simple REST requests (browser-based requests). Slack & Zapier accept only simple requests, this means that content-type headers must be disabled or set to text.
Some services will block browser-based requests entirely. One way around this is to use Zapier and use the Vizlib Button to GET/POST with a webhook. Once this is set up, a trigger can be linked to the webhook and another service to perform a standard server-based REST connection.
For more detail on this common limitation of browser based request, you can read more about CORS (cross-origin resource sharing) here.
For Ajax and HTTP request methods that can modify data (usually HTTP methods other than GET, or for POST usage with certain MIME types), the specification mandates that browsers "preflight" the request, soliciting supported methods from the server with an HTTP OPTIONS request method, and then, upon "approval" from the server, sending the actual request with the actual HTTP request method. Servers can also notify clients whether "credentials" (including Cookies and HTTP Authentication data) should be sent with requests.