02-02-23 02:44 PM
Hi
Please can I have some assistance with regards to uploading a document to Box via an API.
Currently our API's go through Mulesoft, I have managed to create API's in Blue Prism to Search, Delete Folder, Delete File, Get folders etc... However I can get the Document Upload request to work.
This is working in Postman, but I am unsure how to move this into Blue Prism. We are using Basic Access which works fine.
I have done all of it so far via Web API Services and would like to keep the upload in that part also
I have attached a file with what postman looks like and from BOX what they require.
Thank you
02-02-23 08:09 PM
03-02-23 08:14 AM
03-02-23 04:39 PM
--[boundary]
Content-Type: application/json; charset=UTF-8
{
"name": "[fileName]",
"parent": {
"id": "[id]"
}
}
--[boundary]
Content-Disposition: form-data; name="[fileName]"
Content-Type: [mimeType]
Content-Transfer-Encoding: base64
[fileValue]
--[boundary]--
06-02-23 09:03 AM
06-02-23 01:58 PM
14-02-23 10:56 AM
Hi @ewilson
Thank you for the assistance, we are still struggling at this side to work it.
Are there any other suggestions? we are getting a 400 error.
Postman it works fine but duplicating in Blue Prism is still an issue.
Thank you
14-02-23 02:50 PM
Cheers,
15-02-23 02:03 PM
Hi @ewilson
Below is screen shot from Postman raw data being input
Below is what I am using, on difference is the ID folder location i am saving to, I decided to just hardcode most of it for now into the template until i can find out what is wrong.
Below is the error message I am seeing
Here is a link to the BOX developer portal on how to upload a document
https://developer.box.com/reference/post-files-content/
I have amended the content type but i now get a 415 error
15-02-23 03:00 PM
One quick question. The lines I highlighted below are actually on one single line within your template definition, correct? So the actual Content-Disposition entry looks like this: Content-Disposition: form-data; name="attributes"; Just making sure because you do not want these particular items to have line breaks.
Cheers,