Post

2 followers Follow
0
Avatar

infinite loop paging

Hi,

I'm trying to use REST API to connect with Qliksense (an BI tool).

I'm using the following URL:

https://apie1.clarizen.com/v2.0/services/data/query?q=SELECT Project.Name,ReportedDate FROM Timesheet WHERE ReportedDate>=2021-09-01

It only returns 100 records from this query, so I'm using Pagination/Paging in order to get all the records (There supposed to be 3232 records).

This is how I enter my parameter:

- I chose Offset as Pagination type. Actually I'm not sure but I guess I should use this.. There are also 'Next url', 'Next token', 'Next page' to choose from.

-Since the call returns 100 records the first time, so I specify 100 as 'Start initial value', which means it should start retrieving data from 100th row.

-I enter 1000 in 'Count' initial value, since I want to retrieve 1000 records in each subsequent call.

-Data indicator path: if 'hasMore' is true, then keep fetching data.

However, when I do this in Qliksense, The loading process seems to never stop.

Does anyone know why this occurs and how can I fetch all the data that satisfy my query ?

Cheryl Answered

Official comment

Avatar

Hi Cheryl,

The way to control how many rows to pull and which row to start on is via the LIMIT and OFFSET parameters. LIMIT has a maximum value of 5000.

To get the first 5000 records:

https://apie1.clarizen.com/v2.0/services/data/query?q=SELECT Project.Name,ReportedDate FROM Timesheet WHERE ReportedDate>=2021-09-01 LIMIT 5000 OFFSET 0

To get the second 5000 records:

https://apie1.clarizen.com/v2.0/services/data/query?q=SELECT Project.Name,ReportedDate FROM Timesheet WHERE ReportedDate>=2021-09-01 LIMIT 5000 OFFSET 5000

I.e. The only difference in each call is the OFFSET parameter.

I hope this helps.

Roland

Roland Pumputis
Comment actions Permalink

Please sign in to leave a comment.

1 comment