Help to better understand sysparm_limit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2022 10:52 AM
Hi all.
I'm using ServiceNow Rest API calls to pull the records into Power BI. And in my example, I need to pull all the records. For that, I would have to leave without the sysparm_limit, right?
https://<your_instance>.service-now.com
/api/now/table/incident?sysparm_display_value=true
&sysparm_exclude_reference_link=true
&sysparm_fields=number%2Ccategory%2Cstate%2Cshort_description
%2Cassignment_group%2Cassigned_to&sysparm_limit=10
I was wondering if this can cause any performance issues?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2022 11:16 AM
Hi Flavio,
You need to use sysparm_offset along with sysparm_limit.
Please see their purpose at below link:
ServiceNow Table API GET method
Hope this helps!
Thanks and regards,
Subrahmanyam Satti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2022 12:50 PM
But from what I understand, it is in each request that is made, it returns the value that was chosen in sysparm_limit, right? I believe that with each request, it will not exceed this default value. If I'm going to use this default value, do I need to set the sysparm_limit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2022 07:18 PM
Hi
ServiceNow documentation says - "Maximum number of records to return. For requests that exceed this number of records, use the sysparm_offset parameter to paginate record retrieval."
and Large sysparm_limit can cause performance issues.
Please mark my answer as correct/helpful, if it helped.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2022 07:59 PM
Hi,
for each API request it would fetch only those record count which are specified in sysparm_limit
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader