REST API Response Body "No known way to render data"

jpeterson1
Giga Contributor

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?

1 ACCEPTED SOLUTION

jpeterson1
Giga Contributor

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

View solution in original post

4 REPLIES 4

Prasad Pagar
Mega Sage

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

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?

jpeterson1
Giga Contributor

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

Hi @jpeterson - Thats exactly what I said sir

find_real_file.png

You have marked you own response correct its fine but please at least mark my response as helpful 😞

Thank you
Prasad