Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

How to configure Postman (desktop app) to connect to Qlik Sense

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Andre_Sostizzo
Digital Support
Digital Support

How to configure Postman (desktop app) to connect to Qlik Sense

Last Update:

Oct 26, 2022 10:32:16 AM

Updated By:

Andre_Sostizzo

Created date:

Jan 24, 2018 9:52:52 AM

This article will outline how to connect to Qlik Sense's APIs using the desktop app version of Postman. The desktop app is a standalone application whereas the Chrome Extension version is being deprecated. For insight into configuring the Chrome Extension, see article QRS API using Xrfkey header in Postman Chrome Extension.

Environments:

 

Assumptions:

  • Postman is installed
  • OpenSSL is installed
    • In this guide we will use a Windows version of OpenSSL provided by Shining Light Productions. Other Windows versions may operate slightly differently, likewise for *Nix (UNIX, Linux, etc.) based versions of OpenSSL 
  • The ports being called are open between the machine with Postman installed and the server
    • Example 4242 being the direct QRS port

Process with PEM Certificates (Simplest, Doesn't Require OpenSSL): 

  • Go into the QMC > Certificate section and export a copy of the certificates used in the site:
    • Arbitrary machine name (best practice is to use the machine you are making the API calls from)
    • No password on the files
    • Include secrets key
    • PEM Format
  • Copy the client.pem and client_key.pem from C:\ProgramData\Qlik\Sense\Repository\Exported Certificates\{computer name} (on the Central node if in a multi-node site) to a place where you can access it from Postman
  • Make a copy of the client.pem and client_key.pem files, and rename them to client.crt and client_key.key.
  • In Postman:
    • Go to Settings > Certificates > Add Certificate
    • Enter in the hostname of your Qlik Sense Server and port (e.g., servername.company.com with port 4242 in the example below)
      • Note: Since you must enter the port used to connect, if you plan to connect via both the Proxy and directly to the QRS then you will need to specify both ports (443 and 4242 respectively). The same goes for QPS calls (4243)
    • Navigate to the where the .crt and .key files is located
    • Enter the passphrase if you used one
    • Click Add to add this certificate to Postman
    • If using a self-signed certificate: Go to Settings > General > Request > SSL certificate verification and disable certificate verification.
  • Make a test request to a known good QRS API endpoint

Process with PFX Certificates (Requires OpenSSL): 

  • Go into the QMC > Certificate section and export a copy of the certificates used in the site:
    • Arbitrary machine name (best practice is to use the machine you are making the API calls from)
    • No password on the files
    • Include secrets key
    • Windows format
  • Copy the client.pfx from C:\ProgramData\Qlik\Sense\Repository\Exported Certificates (on the Central node if in a multi-node site) to the bin directory of OpenSSL (C:\OpenSSL-Win32\bin for a default install of the above version of OpenSSL).
  • Open a command prompt with administrative rights
    • cd C:\OpenSSL-Win32\bin
    • openssl pkcs12 -in client.pfx -nocerts -out sense.key
      • The import password value will be whatever was used when exporting the certificate, if none then press enter
      • PEM pass phrase is a pass phrase to secure the .key file
        • Ultimately Postman will record this pass phrase in clear text so whether this is used or not is left up to the individual
    • openssl pkcs12 -in client.pfx -clcerts -nokeys -out sense.crt
      • The import password value will be whatever was used when exporting the certificate, if none then press enter
  • Copy the outputted .KEY and .CRT files to the client machine where Postman is installed
  • In Postman
    • Go to Settings > Certificates > Add Certificate
    • Enter in the hostname and port
      • Note: Since you must enter the port used to connect, if you plan to connect via both the Proxy and directly to the QRS then you will need to specify both ports (443 and 4242 respectively). The same goes for QPS calls (4243)
    • Navigate to the where the .CRT file is located
    • Enter the passphrase
    • Click Add to add this certificate to Postman
    • If using a self-signed certificate: Go to Settings > General > Request > SSL certificate verification and disable certificate verification.
  • Make a test request to a known good QRS API endpoint

Video walkthrough:



(source: https://www.youtube.com/watch?v=XF9CKO63zk0)

Labels (1)
Comments
gal_polak
Creator
Creator

This is great!! 

thank you very much 🕺

pshukla3
Contributor
Contributor

@Andre_Sostizzo  The postman desktop app is slightly updated, getting an error with the current steps.

This is the error  - Error: error:0900006e:PEM routines:OPENSSL_internal:NO_START_LINE

 
subramani_r
Contributor III
Contributor III

I am getting the same error as Shukla. @Andre_Sostizzo / @gal_polak / @pshukla3 , Can you please help?

 

subramani_r
Contributor III
Contributor III

I exported in the PEM format and followed all steps, but I am getting the following error now:

Error: connect ETIMEDOUT 167.219.19.251:4242

Andre_Sostizzo
Digital Support
Digital Support

@pshukla3 , looks like you may need to convert your pfx to pem.  see https://community.postman.com/t/errorpem-routinesno-start-line/6108/2

 

@subramani_r , I would test this with Postman on the QS server itself to make sure you don't have a network restriction between the server and your computer. Also would make sure the correct server FQDN is used in your request.

subramani_r
Contributor III
Contributor III

@Andre_Sostizzo , Thanks for the response. Can you please clarify as to what you mean by testing postman on the QS server itself? Should I install postman on the same server where QS enterprise is installed?

I am using the correct server FQDN, but its still not working. I am able to access the Qliksense environment on my browser but not able to do that through postman by following the steps given in the above description. Can you please suggest me any other way to fix this?

 

LDR
Creator II
Creator II

Hi @Andre_Sostizzo 

Thanks for your example, it worked for me exporting certificates from QMC.

I'd like to ask if Postman can be used for obtaining the script of each app. I mean, now I have a list of apps and for each one I'd like to open it and obtain its script. Is that possible? or I have to use solutions like QlikSense.NetSDK (.Net) or Enigma.js(Java Script).

Thanks in advance

Andre_Sostizzo
Digital Support
Digital Support

@LDR , tagging @Levi_Turner who may have feedback. 

ifytra
Contributor III
Contributor III

Hello there @LDR ,

 

I was trying to find a similar answer (get the script of an app without opening the app in Hub) via Postman, but the only easy way I found was via 'Engine API Explorer ' (URL: Engine API Explorer ‒ Qlik Sense for developers).

 

In order to use this tool please follow the steps below:

1.) Open one of the following URLs: 

- from a point that can access the QS Server

https://<QS_SERVER>/dev-hub/engine-api-explorer

- from inside the QS Server

https://localhost/dev-hub/engine-api-explorer 

2.) Login with your RootAdmin account.

3.) Click 'Connect to engine' button.

4.) Select an app from the drop-down list.

5.) From the 'Select API calls' please choose 'Doc' > 'GetScript' method.

6.) Clik the 'Execute' button and the result will appear in the 'Execution logs' > 'GetScript' > 'Response'.

7.) Get the line starting with 'qScript'.

 

Bear in the mind that the script will appear in a single line, so you will need to replace '\r\n'  characters with new lines (Notepad++ Solution: Search for '\\r\\n' and replace it with '\r\n' in 'Extended mode'). Finally, each tab code segment starts with '///$tab ' (Example: ///$tab Main).

 

I hope this approach will help you temporarily until you find something similar by Postman.

 

BR,

iLiAs

LDR
Creator II
Creator II

Hi @ifytra 

First at all thanks for your answer 😉

Yep, my first step was "Dev Hub" and then I tried to find the right way to get the same info externally. Then I was checking Qlik APIs, finally thanks to this amazing community I learnt:

  • We can use REST APIs (QRS & QPS) for querying things that can be obtained using QMC, instance: list of apps in your QS environment, tasks, etc. For these kind of purposes REST APIs are our friends.
  • If on the other hand we want to work with app's objects then we have to use the Engine API. In this case tools like Postman, curl, etc. are not the way. We have to use programming languages like C#, Java Script, Python, Java, ... or any one with the capability to work with websockets. Here Qlik is helping us because they have created several packages for making our live easier for instance: QlikSense.NetSDK (.Net), Enigma.js (Java Script), etc.

Maybe my latin blood played a dirty trick on me 😂, cause I started to try this and that without reading in detail the documentation that Qlik is sharing. Anyway, I think that now I know the path to follow.

Best regards

Version history
Last update:
‎2022-10-26 10:32 AM
Updated by: