How to extract data from a multipart/form-data body in a Scripted REST API to attach a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2025 02:49 AM
I am configuring a scripted REST API to attach a file from another instance to ServiceNow. The other interface sends me the data in the request body as multipart/form-data, but I am unable to retrieve the different pieces of data from the body.
Do you have any idea how I can achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2025 03:49 AM
these links should help you and it will require custom logic
Inbound Multipart/form-data via the Scripted REST API (in a scoped application)
Handling 'text/plain' and Other Unsupported Content Types in ServiceNow Scripted REST APIs
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader