Post

2 followers Follow
0
Avatar

Get all data using REST API paging

Hi,

I'm trying to get all data that fit my CZQL query:

This is the url I'm using:

https://apie1.clarizen.com/v2.0/services/data/query?q=SELECT Project.Name,ReportedBy.Name,Duration.length FROM Timesheet WHERE ReportedDate>=2021-01-01 and ReportedDate<=2021-08-31&paging={"hasMore":false,"limit":100000}

However, I noticed that the maximum limit I can reach is 5,000. The response is like this:

"paging": {
        "from": 5000,
        "limit": 5000,
        "hasMore": true
    }
 
Can anyone help me out here to get all the data? Thanks a lot!
Cheryl Answered

Official comment

Avatar

Hi Cheryl,

To get the next 5000, add OFFSET 5000 to the end of your query: SELECT Project.Name,ReportedBy.Name,Duration.length FROM Timesheet WHERE ReportedDate>=2021-01-01 and ReportedDate<=2021-08-31 LIMIT 5000 OFFSET 5000

I hope this helps.

Roland

Roland Pumputis
Comment actions Permalink

Please sign in to leave a comment.

2 comments

0
Avatar

Hi Roland,

Thank you for your answer.

However I want to get all the data that satisfy my query, which might be over 10,000 records.

I'm using Qliksense Connector(An BI tool) to connect to the REST API.

There's a Pagination option:

If I select OFFSET, I need to fill in the following parameters (I have no idea whether I should choose Offset, and I don't know if I should, which parameters should I put in)

 Do you have any idea on this? Thank you very much.

Cheryl 0 votes
Comment actions Permalink