How to Run the External System File Upload API from ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 10:16 PM - edited 01-23-2024 10:23 PM
An external system has a file upload API for Content-Type: multipart/form-data.
I want to run the API from ServiceNow, but I don't know how to set it up.
The file you want to upload will be a binary file.
Could you tell me how to set it up?
It succeeds in curl.
curl -i -X POST \
-H "Content-Type:multipart/form-data" \
-H "Authorization:Basic *************=" \
-F "file=@\"./test-excel.xlsx\";type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;filename=\"test-excel.xlsx\"" \
-F "type=144" \
-F "parent_id=111111" \
-F "name=test-excel.xlsx" \
'
https://*************/testapi'
200OK