REST API Get URL too long with sysparm_fields getting error

vijayanand_chid
Kilo Explorer

We are using to import the table using /api/now/v1/table/{tableName} and we specify the list of columns required comma separated in sysparm_fields. When the columns are added the REST API Get URL gets very long and its failing in ServiceNow with the error response

<error><detail>The requested query is too long to build the response pagination header URLs. Please do one of the following: shorten the sysparm_query, or query without pagination by setting the parameter 'sysparm_suppress_pagination_header' to true, or set 'sysparm_limit' with a value larger then 358869 to bypass the need for pagination.</detail><message>Pagination not supported</message></error>

Please let us know if there is a way to send the list of columns without getting the error, any feature to POST the columns in payload in Get API request? Or any other way to overcome this.

7 REPLIES 7

Manoj Kumar16
Giga Guru

Can you run the endpoint as a URL in internet explorer and see what is the size of the data file which is getting downloaded ?


Hi Manoj,



Same error even with browser, the problem is not with the data getting downloaded. ServiceNow not able to process the request when the sysparm_fields in query string of REST table API Get has more number of columns specified.



Below is the error:


<error><detail>The requested query is too long to build the response pagination header URLs. Please do one of the following: shorten the sysparm_query, or query without pagination by setting the parameter 'sysparm_suppress_pagination_header' to true, or set 'sysparm_limit' with a value larger then 358869 to bypass the need for pagination.</detail><message>Pagination not supported</message></error>



Please let us know if there is a way to send the list of columns without getting the error, any feature to POST the columns in payload in Get API request? Or any other way to overcome this.


Manoj Kumar16
Giga Guru

Are you using midserver ?


I don't think there is any midserver.