API Pagination - link to Next Page etc | Adobe Higher Education
Skip to main content
Level 10
February 22, 2019
New

API Pagination - link to Next Page etc

  • February 22, 2019
  • 2 の返信
  • 575 ビュー

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 の返信

Level 3
February 22, 2019

Great idea. I've just implemented this with another system and it makes life so much easier.

Kelly_Wehrmann
Level 9
February 22, 2019

Another great idea, David! :)