Reputation: 1022
I have a json respone from Outreach API and for pagination in qliksense REST connector i need to pass through the total records path. What is path for following json response?
Here's where i need to put this into.
Upvotes: 1
Views: 331
Reputation: 1722
Hi url for total pagination depends on API. Alternatively you can try to call API in chunks and check for more. Example from other API:
SUB getOnePage(vOffset)
LIB CONNECT TO [outreach_api];
RestConnectorMasterTable:
SQL SELECT
(...)
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION (Url "https://api.outreach.io/api/v2/prospects?page[limit]=100&page[offset]=$(vOffset)");
LET vHasMore = Peek('has-more',-1);
/* you need to find parametr which detects more rows or alternatively
count returned number of records is more than 0 */
LET vNext = Peek('next',-1);
DROP Table root;
IF vHasMore = 'True' then
CALL getOnePage($(vNext));
EndIf
EndSub
CALL getOnePage(0)
Upvotes: 1