REST API Get URL too long with sysparm_fields getting error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2017 01:39 AM
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.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2017 02:47 AM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2017 02:55 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2017 03:03 AM
Are you using midserver ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2017 03:20 AM
I don't think there is any midserver.