"sysparm_limit" limit in OOB REST APIs calls

Hamza Berouil2
Tera Guru

Hi all,

We are wondering if there is way to set limit in the parameter "sysparm_limit".

The default limit is 10 000, but in our case we think 10000 could be too large. So we would like to make that users will not put whatever they want in the "sysparm_limit".

Is there an OOB way ?

We found a solution based on Query Business Rules (current.setLimit(x)) but before validating this solution we want to check if there is a better way.

Any idea ?

Thanks

3 REPLIES 3

corina
ServiceNow Employee
ServiceNow Employee

Hello Hamza.



Is it safe to assume that:



1. You do not work with Rest api explorer


2. You practically know that you can modify the value   of sysparm_limit in the URL , but you would like to limit it by default so that users never make it 10.000?


Hello Corina,



Thank you for your reply.



  1. I work with external REST Client
  2. Lets say we dont want users asks for more than 500 rows, if they x in syspam_limit and (x > 500) then the system returns only 500, else (e.g x=<500) it returns exactly x rows

corina
ServiceNow Employee
ServiceNow Employee

Hello Hamza.



Thank you for the confirmation.


I personally do not think we have such an option, at least not OOB.


You could work with timeout only..but this is not exactly what you want.