Suddenly started to get 400 bad request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2024 12:21 AM
We have a job that uses servicenow REST API to query for events every three minutes. It works fine, until yesterday, when suddenly we started to get 400 Bad Request.
I can't reproduce the issue from the development env POSTMAN, same URL works. What can it be?
Regards,
Evgeniy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 12:06 AM
Adding here a root cause , in case anyone would meet same problem:
{
"error": {
"message": "Pagination not supported",
"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 233 to bypass the need for pagination."
},
"status": "failure"
}
Our query was too long.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 12:08 AM
Adding here the root cause: our query was too long, this the message body:
{
"error": {
"message": "Pagination not supported",
"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 233 to bypass the need for pagination."
},
"status": "failure"
}