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
‎11-05-2022 01:08 PM
In order to retrieve bulk data from CMDB or any other table, you should be using pagination approach, as retrieving a large amount of data in one GET call is not very efficient both on source and target side, below article outlines step by step guided method on how to implement dataload using pagination.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2024 01:50 AM
Yes, ServiceNow has a system property that controls the maximum number of records that can be returned by a single REST API call. The property is named 'glide.rest.sweep.max_records'. However, it's important to note that increasing this limit can have performance implications. Here are the steps to change this property: 1. Navigate to 'System Properties' in your ServiceNow instance. 2. Search for the property 'glide.rest.sweep.max_records'. 3. If the property exists, you can modify its value to increase the limit. If it doesn't exist, you can create a new property with this name. 4. Set the value of this property to the desired limit. Be cautious while setting this value as it can impact the performance of your ServiceNow instance. 5. Save the changes. Please note that ServiceNow recommends using pagination to retrieve large amounts of data instead of increasing this limit. You can use the sysparm_limit and sysparm_offset parameters in your API request to implement pagination. For example, to retrieve the first 10000 records, you can set sysparm_limit=10000 and sysparm_offset=0. To retrieve the next 10000 records, you can set sysparm_limit=10000 and sysparm_offset=10000, and so on. This approach is more efficient and less likely to cause performance issues. nowKB.com