- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2021 12:39 PM
I've created a GET REST API and mirrored it from a working PostMan API but in ServiceNow the Response Body is "No known way to render data". I'm getting accurate JSON in PostMan so I'm not sure what's going on with ServiceNow? Has anyone seen this error or know how to handle it?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2021 04:59 AM
I resolved my issue using this thread: https://community.servicenow.com/community?id=community_question&sys_id=bd460fa1db1cdbc01dcaf3231f9619ea
It was due to the content type being application/x-www-form-urlencoded. I had to add an accept header with the value application/json

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2021 01:04 PM
Hi,
Did you tried it using REST API EXPLORER?
Check this
https://docs.servicenow.com/bundle/quebec-application-development/page/integrate/inbound-other-web-services/concept/c_DataRetrievalAPI.html
usually this error come when ServiceNow not able to understand Content Header or some encoded data in input payload
Kindly check
Please mark my answer correct/helpful if applicable.
Thank you
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2021 04:41 AM
Thanks for the response but I am unable to use the REST API Explorer as I'm calling an outside API. Unless there is a way to do this that I'm missing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2021 04:59 AM
I resolved my issue using this thread: https://community.servicenow.com/community?id=community_question&sys_id=bd460fa1db1cdbc01dcaf3231f9619ea
It was due to the content type being application/x-www-form-urlencoded. I had to add an accept header with the value application/json

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2021 05:25 AM