Pagination | Community
Skip to main content
June 24, 2024
Question

Pagination

  • June 24, 2024
  • 2 replies
  • 688 views

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............/?sessionID=6af5a7c1eb1a40a9....................&fields=issues&$$FIRST=1&$$LIMIT=10

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Rafal_Bainie
Community Advisor
Community Advisor
June 25, 2024

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

where i is repeater value starting with 1

4. in every increment merge your results into a table

good luck

lgaertner
June 25, 2024

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=10

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

 

Regards

Lars