Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

ltillemans
New Contributor III

connect to a REST api with the Qlik REST Connector but we are having problems with the pagination

We are trying to connect to a REST api with the Qlik REST Connector but we are having problems with the pagination.

The api we use supports 2 methods of pagination, offset and next url. Both in a slightly different way than the Qlik connector supports. For offset, Qlik expects the info to be either in the headers or in the JSON data itself. In the api we need to connect to, the offset and limit are located in the url. Like this: https://api.url.com/api/v2/employee?limit=10&offset=20 When using Next Page, Qlik looks in the headers as well. This is fine but the api sends multiple links in the same header field called Link. Qlik can’t separate these urls. Like this: [link = ; rel="next", ; rel="last”] I’ve tried writing a custom pagination script and this mostly works but I don’t know how I can read a header value of the response to get the total count.

The total count is located in the header field as ‘X-Total-Count’. Any suggestions on how to get this working?

2 Replies
Employee
Employee

Re: connect to a REST api with the Qlik REST Connector but we are having problems with the pagination

Can you use the WITH CONNECTION functionality to pass values to the URL? e.g. Re: QS S3 Connection for Non Public files

ltillemans
New Contributor III

Re: connect to a REST api with the Qlik REST Connector but we are having problems with the pagination

Thanks for the reply.

The issue is not passing values, we can pass the right URL parameters and header values. The problem is that the response gives back the total records in the headers.  For the pagination we need to know the total amount of records. So we need to find a way to read out the headers of the response data in order to get that amount.

Community Browser