How to control the READ operation via Table API from a 3rd party tool?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2022 12:15 AM
One of the team is using ServiceNow table API to read all the incidents using GET method. They are using something like sysparm_limit=50000 etc (which will ofcourse override the defauly 10k limit)
Though we are telling them to use pagination, they are sometimes not doing that.
So we are looking for a way to control it from ServiceNow side only. Is it possible to control in ServiceNow?
- Labels:
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2022 12:57 AM
Hi suggy,
You can use Pagination where you can specify the number of records to be pulled in every REST API call.
Exporting Bulk Data from Servicenow via REST Web Service Pagination
To do so, you can make use of the parameters
- sysparm_limit: to define how many records you get in one call (10000 by default)
- sysparm_offset: to define the records to exclude from the query
- sysparm_query=ORDERBYsys_created_on: to sort the list of records based on the created date/time
In this case, the first call would be something like
/api/now/table/incident?sysparm_limit=10000&sysparm_offset=0&sysparm_query=ORDERBYsys_created_on
the second one
/api/now/table/incident?sysparm_limit=10000&sysparm_offset=10000&sysparm_query=ORDERBYsys_created_on
the third one
/api/now/table/incident?sysparm_limit=10000&sysparm_offset=20000&sysparm_query=ORDERBYsys_created_on
.
. and so on...
You can put that in a loop to get all the records using pagination until all the records are read.
Resolution
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2022 01:09 AM
Hey
I just updated my question with more clarification. Thank you 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2022 01:10 AM - edited ‎11-19-2023 09:40 AM
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0727636
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0748620
https://www.servicenow.com/community/developer-forum/how-do-you-display-the-default-value-of-sysparm... (As far as i know, that value is not changeable)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2022 05:59 AM
Hi Suggy,
In that case, you can set the "Rate limit rules" present under (System web service -> Rate Limit Rules). Here you can handle the incoming REST API requests from ServiceNow itself.
Inbound REST API rate limiting
To prevent excessive inbound REST API requests, set rules that limit the number of inbound REST API requests processed per hour. You can create rules to limit requests for specific users, users with specific roles, or all users.
You can check the link above to apply as per your requirement.
Hope it helps!!
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg