Is there a way to create a Scripted Rest API to receive and process multipart/form-data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 01:18 PM
I am attempting to develop a custom Scripted REST API that can handle POST requests with a content-type of multipart/form-data within a scoped application. However, everything I have tried either results in an error or leads to this issue:
{ "error": { "message": "com.glide.rest.domain.ServiceException: Server error: attempted to access operations that are not allowed when request content is multipart/form-data", "detail": "" }, "status": "failure" }
or this issue:
{
- Labels:
-
Architect

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 04:11 PM - edited 02-19-2024 04:12 PM
Hi,
Unfortunately, there seems to be a trend of that type having problems within the platform. Have you reviewed this thread/conversation to see if that assists you?
Also this which helps sort of talk about how to use "other" methods: https://snprotips.com/blog/2019/11/18/handling-textplain-and-other-unsupported-content-types-in-scri...
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 04:59 PM
Hi @gcm1 ,
Please refer to below article:
https://www.servicenow.com/community/developer-articles/script-to-send-multipart-including-text-and-...
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda