How to get more than 10000 records in response of GET method in REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2017 03:30 AM
I need to get more that 10000 records with the help of GET method in REST API.
Please guide me is there any property in service now to change maximum returned record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2017 04:16 AM
Hi Sumit,
Increasing the maximum returned record (10000 by default) may have performance implications. What I suggest to retrieve large amounts of records is to use pagination. That is, get sub-sets of records in different calls, for example, first you get records from 1 to 10000 in a call, then you get from 10001 to 20000, then from 20001 to 30000, etc.
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
In this case, the first call would be something like
/api/now/table/incident?sysparm_limit=10000&sysparm_offset=0
the next one
/api/now/table/incident?sysparm_limit=10000&sysparm_offset=10000
the next one
/api/now/table/incident?sysparm_limit=10000&sysparm_offset=20000
...
You can put that in a loop to get all the records using pagination.
For more info you can take a look to Table API - GET /now/table/{tableName}
Hope it helps,
Ginés.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2018 12:01 PM
HI Sumit, Did you find any solution on this, I have a requirement to remove the cap limit of 10,000 While using GET.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2018 03:26 PM
Hello,
The 10000 limit is being caused by omission of the parameter sysparm_limit which default value is 10000. If you specify a higher value in the URL then you can get the desired amount of records.
Example: /api/now/table/incident?sysparm_limit=40000
Ken.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2020 11:49 AM
I Know this is an old thread, but I had to comment on this for the sake of other people looking here for answer.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0727636
Sincirely,
Anders