Expand my Community achievements bar.

Pagination

Avatar

Level 2

Hello,

I am having an issue with pagination, I have 6263 Requests under one project while I use API to fetch optask I get only 2000.

 

I used pagination as $$FIRST and $$LIMIT, but still not could you please help me how to perform pagination.

 

https://veridiancu.my.workfront.com/attask/api-internal/proj/5b719232001b7dfcc............/?sessionI...

2 Replies

Avatar

Community Advisor

Hi there,

2000 is inherent limit on Workfront end. If you want to fetch more results here is 1 idea I use in Fusion.

1. build your query

2. use sort option in your query

3. build a loop referring the sort that would increment 2000 in every loop

Rafal_Bainie_0-1719297827494.png

where i is repeater value starting with 1

4. in every increment merge your results into a table

Rafal_Bainie_1-1719297944285.png

good luck

Avatar

Level 10

Hi,

 

as you are talking to the PROJ endpoint, you are fetching the issues as a nested collection.

In your call the $$LIMIT and $$FIRST variables are only valid for the "first level" results returned by this endpoint.

 

I am quite sure, that you cannot limit the nested collection result, so you would need to go the other way round and call the endpoint  OPTASK, which is the one for issues.

 

https://veridiancu.my.workfront.com/attask/api-internal/optask/search?projectID=<projectID>&$$LIMIT=...

This will return the issues assigned to the projectID as well, but you will be able to work with pagination.

 

Regards

Lars