cancel
Showing results for 
Search instead for 
Did you mean: 

BOX API Upload

matthew.cable
Level 5

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



------------------------------
Matthew Cable
Consultant
Zurich
Europe/London
------------------------------
39 REPLIES 39

@Brett Erickson 

Yes one line.

On the box site it looks like this, we do not use Bearer accesses tokens though

curl -i -X POST "https://upload.box.com/api/2.0/files/content" \
     -H "Authorization: Bearer <ACCESS_TOKEN>" \
     -H "Content-Type: multipart/form-data" \
     -F attributes='{"name":"Contract.pdf", "parent":{"id":"11446498"}}' \
     -F file=@<FILE_NAME>



------------------------------
Matthew Cable
Consultant
Zurich
Europe/London
------------------------------

@Matthew Cable

Have you looked at the Box API connector that's available on the Digital Exchange? I've run some tests with the Upload File action in it and it works fine. This is a VBO as opposed to a Web API though. Not sure if that bothers you. If you want to give it a try you'll want to make sure you also have the latest version of the Utility - HTTP VBO installed too.

https://digitalexchange.blueprism.com/dx/entry/9648/solution/box-api

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson 

I have downloaded it, but it has compile errors, so does the latest Utilities JSON to collection.
I have attempted in the HTTP but still get issues.



------------------------------
Matthew Cable
Consultant
Zurich
Europe/London
------------------------------

@Matthew Cable

The HTTP VBO and the JSON VBO should both have a version number listed on the Initialise tab. Can you post screenshots of those?

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hi @ewilson 

The first is the Json to collection 

22428.png22430.png

The next is HTTP 

22432.png

22433.png

Thank you



------------------------------
Matthew Cable
Consultant
Zurich
Europe/London
------------------------------

Matthew,

Thank you for being a SS&C Customer and for using SS&C Blue Prism.

In connection with the JSON asset, could I ask you download it again from the DX? The reason being I have been adding functionality to it this week and to be honest your error looks like C# code is being validated by a VB.NET parser. I could be wrong, but that's what it looks like.

The current version, which I posted yesterday, is V10.0.1 and has 2 new actions for working with JsonPath. This might resolve at least some of your issues. With regards the issues shown for the HTTP VBO would require a little investigation, could you advise the version of Blue Prism you are using?

Let me know how you get on and if we can help any further.

Once again, thank you for using SS&C Blue Prism.

regards



------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst Senior DX Engineer - Digital Exchange - EMEA SS&C Blue Prism

hi @Geoff Hirst 

I have downloaded the latest version and still have a handful of errors below. We are also using V6.7.2

22472.png



------------------------------
Matthew Cable
Consultant
Zurich
Europe/London
------------------------------

Hi Matthew,

Could you take a look at the initialise page of the Json asset. Does yours look like this?

22487.png

The areas in yellow are the important bits to determine if you have the most current version (you may not have, I only posted it back to the DX last week and it may not have made it through QA).

If we can determine that then at least that will explain that. If I look at the error list on my machine for this asset it doesn't show any. So we need to see what is causing this issue for you. There is a national holiday in the US today, so I will assist you as much as I can.

regards



------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst Senior DX Engineer - Digital Exchange - EMEA SS&C Blue Prism

@GeoffHirst 

Please see screen shot below, looks like the latest one.

22503.png



------------------------------
Matthew Cable
Consultant
Zurich
Europe/London
------------------------------

Hi Matthew,

That screen of dependencies actually hasn't changed, I was just interested to see that your version was set to C# which it is. What we need to look at is the version number on the initialize page. If you have the latest, then its 10.0.1. 

Can you also provide that list of errors as a full window, so that we can see which asset is actually causing the problem as right now I can't replicate what you are seeing but we will get to the bottom of the problem.

regards



------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst Senior DX Engineer - Digital Exchange - EMEA SS&C Blue Prism