What is the maximum length of sysparm_query in REST API GET request or the max length of the entire REST API GET request string

anakinting
Kilo Explorer

I cannot find any place that specify the max number of char for REST API request or sysparm_query.

So here is the example of my request:

curl --user 'username':'password' "https://instance.service-now.com/api/now/table/incident?sysparm_limit=10&sysparm_query=LONG_GIANT_QUERY&sysparm_offset=0" --request GET --header "Accept:application/json"

Server stop returning any response when number of char in my sysparm_query exceed approx. 2500.

Question are:

Is there any limit on number of char in sysparm_query or the REST API query?

If the limit is from the server, can we disable the limit or increase the limit?

3 REPLIES 3

Michael Fry1
Kilo Patron

The limit is 120 but you can increase it to more. Follow this thread how to do it or open HI ticket and they will do it for you.


RESTMessage endpoint max string length ?


120 is the max_length property of ecc_queue table and all rotated ecc_queue tables.


I want to know the limit of the REST api get request just from the commandLine using curl.



You can try with simple repeated query like this : sysparm_query=active=true^active=true^active=true..............


Eventually the server will stop returning response when the length of char in the query exceed something like ~2550 which is way much more then 120.


Umang Doshi
Kilo Explorer

Did this ever get answered? I am having the same question.