HI need quick help with Rest API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 10:48 AM - edited 02-20-2025 11:08 AM
Im using Rest Step to invoke API to an 3rd party IT Desk
However the description with special character are not constructed properly for the input json.
Description in service now is this > Path :\\100.0.0.1\homedir\homedir\Network\Management
The whole input data sent which is not recognized
[{"name":"input_data","type":"application/json","order":0,"value":"{\"change\":{\"title\":\"A failed RAID controller card needs to be replaced on PSORA1\",\"description\":\"Path :\\\\100.0.0.1\\homedir\\homedir\\Network\\Management\"}}","itemType":"multi-part-data","part_type":"text","content_type":"application/json","set_content_type":"from_attachment","file_name":"","set_file_name":"from_attachment","showType":true,"label":"input_data"}]
when i send this directly the input is not recognized as JSONInput in the 3rd party IT Desk.
So i stringified the description to add escape sequence with a Script Step before executing the Rest API . However not encountering error in Service now itself. Receiving this error Error encountered executing HTTP request
[{"name":"input_data","type":"application/json","order":0,"value":"{\"change\":{\"title\":\"A failed RAID controller card needs to be replaced on PSORA1\",\"description\":"Path :\\\\\\\\100.0.0.1\\\\homedir\\\\homedir\\\\Network\\\\Management"}}","itemType":"multi-part-data","part_type":"text","content_type":"application/json","set_content_type":"from_attachment","file_name":"","set_file_name":"from_attachment","showType":true,"label":"input_data"}]
Looks like the json for the input is not well construced.
Need quick assistance in this
Thanks in Advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 07:26 AM
Can you change your Input Data type to JSON? It looks like it is trying to make it into a text string, which makes it put the quotes around it and escape the internal quotes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 07:41 AM
Hi Thanks for the reply,
I have only two options list and also the content type is set to application/json only. Refer below image.
I could be wrong please guide me if anything can be done
Thanks in Advamce

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 12:08 PM - edited 02-21-2025 12:09 PM
Change the request type from MultiPart to Text. Then either compile the payload in a Script step before the API call and insert it into the body like this or put the payload in the way you have it.