How to pass muliple query parameter as request body to fetch data from Incident Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 04:27 AM
Hi All,
I am doing integration with 3rd party system wherein I need to fetch data from ServiceNow incident table and I have long list of query parameters which needs to be passed as JSON in request body.
If someone has done, please provide an example of request body.
Regards,
AG

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 04:33 AM
Hello @Aditi6
OOTB table API to read table data (GET) will not have request body. You will need to pass query in URL, but it will have length limit.
POST type API will have the request body. You can custom script API of type POST and in script, you can query table data and send response as needed.
But TBH it does not make sense to have POST type API to read data, but if it is must have business need then you can do it.
Thank you,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 04:44 AM - edited 07-14-2023 04:46 AM
Hi Ali,
Thanks for response.
We are using GET API, but it gives 414 Request-URI Too Large, as per solution posted on community, they asked to convert to POST.
https://www.servicenow.com/community/itsm-forum/saying-quot-414-request-uri-too-large-quot-serviceno...
Please help if in example how to send multiple incident numbers as a filter criteria. We are using POSTMAN to fetch data

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 05:06 AM
You can try the scripted rest API for get, define the request payload and custom response body.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 05:22 AM
you need to use GET to send query parameters.
if it has limitations then you can pass encoded query
what's your exact use case?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader