Is it possible to paginate results with the JSONv2 web service?

Mark Epps
Tera Contributor

I don't have access to the rest API and am currently running into 2 errors when retrieving records with the JSONv2 web service:

  • Maximum Execution Time exceeded
    or
  • 10,000 record row limit (glide.processor.json.row_limit)

Based on the documentation I can limit the records with "sysparm_record_count" but there is no option to offset like there is with the rest API (e.g. &sysparm_limit=100&sysparm_offset=0)

Any ideas or workarounds?

2 REPLIES 2

Kirby R
Kilo Sage

Hi @Mark Epps ,

 

I believe there's no available workaround if you're using JSONv2 unless the platform allows updating that property.

The only solution I can think of is using scripted rest API in ServiceNow that paginates the rows using GlideRecord chooseWindow GlideRecord | ServiceNow Developers.

 

Doing this approach may require you(API consumer) to call the API multiple times depending on the row count and each time you will be passing in the parameters for the page.

 

Please mark correct if this helped your concern.

Unfortunately, I only have access to the JSONv2 webservice and the standard web UI.  Running ServiceNow Rome.

I did some more googling and am testing the following two methods