Qlik Community

Qlik Design Blog

All about product and Qlik solutions: scripting, data modeling, visual design, extensions, best practices, etc.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
Employee
Employee

Starting with version 12 of QlikView we released a new connector that allowed developers to extend the target data sources available. The Qlik REST Connector provides a means for the Qlik Analytics Platform to efficiently load data into a Qlik Sense or QlikView application from a REST service that returns data in XML, CSV or JSON format.

 

What is REST?

 

REST stands for Representational State Transfer. It relies on a stateless, client-server, cacheable communications protocol. RESTful applications use HTTP requests to post, read, and delete data. REST is a lightweight alternative to RPC (Remote Procedure Calls) and Web Services (SOAP, WSDL, et al.).

 

More info on REST (Representational state transfer - Wikipedia, the free encyclopedia)

 

The Qlik REST Connector

 

The Qlik REST Connector is a generic connector, it is not tailored to a specific REST data source. The requirements for creating connections must be acquired from the specific data sources. Examples for connecting to popular social network platforms are provided in the help documentation.

 

How to get the connector?

 

Get the connectors here: Qlik Connector Packages

 

How it works. Getting Star Wars data

 

If you read the Qlik documentation you will find examples on how to get data from Facebook, Twitter, LinkedIn and even Google Analytics.

 

For this post example we are going to get data from this website http://swapi.co/ It contains data from the universe of Star Wars. It uses JSON format to give us access to data about the seven films so we can plot some SW demographics.

 

Because Qlik REST is a generic connector first step to connect to a new data source will always be to carefully read the documentation from the source where the data will be acquired from.

 

I’m interested in getting data from the Characters, in the API documentation web page we can read how to query the requested data.

http://swapi.co/documentation#people

 

  1. Create new connection. Give your connection a name and then fill in the blanks.
    1. Request URL. http://swapi.co/api/people/
    2. Data Options. If you want to specify the output data type, JSON, CSV or XML during the load process you can uncheck it otherwise keep it auto detect.
    3. Key generation strategy will let you define how you want it to generate the table’s keys, I rarely change it from Sequence ID.
    4. Authentication. This API uses no authentication so we can skip that.
    5. Pagination. Qlik REST connector will provide you with standard pagination methods (explained in help page) and Custom pagination that will let you do build your own process.

      If you are looking for more pagination examples please check help page

      For this particular example I will pick Next URL as it comes specified in the API documentation.

      pic1.png
      pic2.png



    6. Query parameters & Query headers. For this API we don’t have to specify any further parameter.
  2. We should be good to go (you might want to normalize fields names and so forth) and perform a reload.

 

pic3.png

I'm attaching the app so you all can check how it's done.

 

Enjoy Qliking

AMZ

http://twitter.com/arturoqv

25 Comments
Not applicable

hi Arturo,

I am new to REST connector. I am trying to use it to connect a JSON API and have to use the POST method with input request. I can connect it successfully but error ("Error Processing the Request") is return. From what I guess, I didn't input the request in a correct way. Could you advise whether I should input the request in the "Request body" or "Parameter"? And where can I get some reference about the format or syntax of the request I input?

Thanks,

Peggy

0 Likes
2,799 Views
Luminary
Luminary

We are using this connector extensively, and while it has a couple of quirks, it's been very stable during past months. So it should be a good bet if you need to get data from REST APIs.

Very hard to advice on your particular problem though, without knowing what the target API looks like...

The documentation that comes with the rest connector is fairly good (even though pretty technical.. I had to read it through a bunch of times before fullt understanding it).

As a general recommendation, I also suggest using some other REST API tool first, to get familiar with the API you want to get data from.

I personally use Paw on OSX - very, very nice app for dealing with REST APIs, including various authentication mechanisms etc.

I would start there, make sure you understand the API, then move over to Sense and the rest connector and get that working.

Happy to help more concretely if you share some more data on the API in question.

0 Likes
2,799 Views
Partner
Partner

Hello Arturo,

I’m trying to use the connector to connect to an internet resource from a corporate network. All internet traffic goes through proxy server with Windows authentication. So far I had no luck and didn’t find any way to configure proxy-settings or proxy-authentication. Attached you'll find the error message I receive.

Can you help out on this topic?

Thanks

Markus

REST Proxy Error.png

0 Likes
2,799 Views
Creator
Creator

Hi Markus,

have you solved this issue? I have same issue now.

would it be possible to share how you solve this issue?

thanks.

John

0 Likes
2,799 Views
Partner
Partner

Hi John

I've just solved the issue with the help of the Qlik Support.

You have to extend your "QvRestConnector.exe.config" in "C:\Program Files\Common Files\QlikTech\Custom Data\QvRestConnector" and "C:\Program Files\Common Files\Qlik\Custom Data\QvRestConnector" with the following code:

<?xml version="1.0"?>
<configuration>

[...]

<system.net>
  <defaultProxy useDefaultCredentials="true">
  <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://PROXY:PORT" usesystemdefault="false"  />
  </defaultProxy>
</system.net>


</configuration>

Regards

Markus

2,799 Views
Employee
Employee

Thanks for sharing Markus!

0 Likes
2,799 Views