Qlik REST connector is made primarily for loading data from RESTful data source APIs. But in some situations, you might want to send HTTP POST requestd to certain APIs via REST connector. This could be difficult against the Qlik Sense QRS APIs if you are using Windowns authentication.
This article will show you how you can make a REST data connection against Qlik Sense QRS API endpoints using POST method.
If you are using the Windows authentication method in the Qlik Sense Virtual Proxy settings, then from REST connector you can only use the GET method for your calls to the QRS APIs.
This is because Qlik Sense needs to redirect your initial call for the authentication, and only the HTTP GET requests can be redirected.
If you put anything other than GET in the REST connection settings, you will receive an error message telling that "The initial authentication request must be a "GET" request in order to be redirected to the authentication module.".
But it is not achievable to have both GET and POST requests in the same connection with the current REST connector.
Qlik Sense: June 2017 or higher
Since the key to resolve the issue is to get your REST request being authenticated, you need to configure other type of authentication than the Windows authentication.
There are at least 3 options you can use to achieve this.
The first option is to configure a dedicated Virtual Proxies using Header authentication. You can refer to this page
for more information.
The second option is to configure a dedicated Virtual Proxies using JWT authentication. You can refer to Qlik Sense: How to set up JWT authentication
about how to do it.
The third option is to configure the REST connector directly connecting to the QRS APIs using Windows certificate. Refer to How to setup a Data Connection to the QRS API using Certificates on the June 2017 release or higher
about how to do it.
Once you have done any of these, you are able to use POST method in you REST call towards QRS APIs directly.