The article illustrates how the syntax may look like in jQuery (using an Ajax call) when developers query the Qlik Sense Repository Service API (QRS API) to ping for example the “full” end point – more details on end points can be found here https://help.qlik.com/en-US/sense-developer/3.1/Content/Home-developer.htm. Once the call is made, the expected result will be a JASON response holding details about the applications hosted on the Qlik Sense Server, information like applications ID, owner, creation date schema path etc. Then the response is intercepted and displayed within a web page.
- This example has been tested on Qlik Sense Enterprise 3.1.3.
- The QRS call has been tested first in Postman to make sure we get a proper response from the API. It is a good habit to test such API calls in order to make sure we are using the right URL and parameters needed for the call.
- In QMC under the Proxies section, you must allow HTTP, for this example to work.
- There is a need for creating a new virtual proxy in Qlik Sense Management Console (QMC). See images below for inspiration, it is the header authentication method that has been picked for this test for our testing, see images below:
The first step as mentioned above was testing the call in Postman to see if the API call itself is valid or not and if we get any response from QRS API. The URL and values used in Postman as well as the JASON response we got looks like this:
With regard to the actual syntax of the Ajax call, it looks like this, note the path in the URL, qlikserver1.domain.local/mash, where mash is the prefix of the virtual proxy we created earlier:
"hdr-user":"domain\\administrator" // Can be changed to fit your needs including passing html form values
$("#greeting-content") is the reference to our DIV in the HTML page that is meant to display the response.
The JASON response passed on to the HTML page:
In case something missing then kindly refer to the example full source code (Ajax2QRSAPI.zip) attached to this article.
This document was generated from the following discussion: The specified item was not found.