Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

API Pagination - link to Next Page etc

Avatar

Level 10

21-02-2019

One of the things which would make Workfront's API even better is if it provided links for the next page of results. This would allow it to be more easily used with other tools such as Azure Data Factory where you can configure pagination settings to use these links to get the next pages of results for a given set of query parameters.

ServiceNow is an example of a system which provides this functionality. Here's their documentation:

REST message data can be split into multiple result sets rather than forcing the user to submit multiple requests. The header has different links available for the first set, previous set, next set, and the last set of records, where applicable.

For example:
https://<instance name>.service-now.com/api/now/table/cmdb_ci?sysparm_offset=40&sysparm_limit=10000>;rel="next",
https://<instance name>.service-now.com/api/now/table/cmdb_ci?sysparm_offset=40&sysparm_limit=10000>;rel="prev",
https://<instance name>.service-now.com/api/now/table/cmdb_ci?sysparm_offset=0&sysparm_limit=10000>;rel="first",
https://<instance name>.service-now.com/api/now/table/cmdb_ci?sysparm_offset=2780&sysparm_limit=10000>;rel="last"
2 Comments