Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to Run the External System File Upload API from ServiceNow

Akihiko2
Kilo Contributor

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

0 REPLIES 0