Expand my Community achievements bar.

API Pagination - link to Next Page etc


Level 10


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"