Help to better understand sysparm_limit

Flavio8
Kilo Contributor

 

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!

5 REPLIES 5

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Flavio,

>I need to pull all the records. For that, I would have to leave without the sysparm_limit, right?

The default value is 10,000 so if sysparm_limit is not specified, it will default to 10,000 records.

From Now Support documentation

By default, ServiceNow has the max limit of 10000 records which will be returned in any rest call and is being caused by the 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.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0727636

>I was wondering if this can cause any performance issues?

Following is written in the above Now Support page,

 Note: Increasing the maximum returned record (10000 by default) may have performance implications.

It's better to loop to fetch records in chunk of 10,000 using sysparm_limit = 100000 and using sysparm_offset and sysparm_query as mentioned in the Now Support page.