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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-12-2015 01:49 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-12-2015 06:56 PM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2015 08:06 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2018 07:24 PM
Did this ever get answered? I am having the same question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2026 10:38 AM - edited ‎07-16-2026 10:48 AM
Hi,
Kept seeing some older references so I just quickly checked on a PDI (Australia/2026) using binary chop etc:
and for testing a query like:
'user_nameIN{long string of impossible usernames}^ORuser_name=admin'
I would probably avoid overly long lists in practice though as there is also a server side impact. Anyway approx results below: (same results for Table API and XMLEncoder)
All queries succeeded (returned one row) until the HTTP Error response.
| Size bytes | Error | |
| HTTP GET | approx 8KB (~8,192) for entire URL | 414 Request-URI Too Large (snow_adc) |
| HTTP POST + X-HTTP-Method-Override: GET | approx ~2MB (2,097,148 bytes) for body (sysparm_*) | 413 Unable to serve request |