Pankaj Kaundal
Pankaj Kaundal

Reputation: 1022

What is the json total records path for Qliksense REST connector?

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?

enter image description here

Here's where i need to put this into.

enter image description here

Upvotes: 1

Views: 331

Answers (1)

Hubert Dudek
Hubert Dudek

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

Related Questions