Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Levi_Turner
Employee
Employee

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

Anonymous
Not applicable
Author

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.