โ08-29-2018 08:44 AM
Hi, Iโm trying to do a multi-part form REST Post to box.com upload API which requires a file and an attributes part. Weโre getting an error indicating that the parent parameter canโt be found. Parent is essentially the folder id in Box. The box API says the call would be sent like so:
curl https://upload.box.com/api/2.0/files/content
-H โAuthorization: Bearer ACCESS_TOKENโ -X POST
-F attributes=โ{โnameโ:โtigers.jpegโ, โparentโ:{โidโ:โ11446498โ}}โ
-F file=@myfile.jpg
Hereโs the sample pipeline Box REST POST_2018_08_29.slp (8.6 KB)
In this iteration Iโm creating the attributes as an expression and passing it into the HTTP entity element in the REST POST Snap. Iโm not sure how else to pass these attributes data elements to the REST POST call. I feel like Iโve tried everything but box.com doesnโt seem to see the parent attribute which is necessary for the call to succeed. Admittedly, Iโm a bit new to using the REST snaps, but hoping someone could throw out some ideas to try. Thank you!
Craig
โ04-11-2019 11:07 AM
Iโve been experiencing the same issue as Craig here. I tried replicating the examples from the REST POST documentation on uploading a file, but I donโt seem to be able to pass the โparentโ parameter to the API.
โ04-11-2019 01:17 PM
Have you tried using the Box snaps instead of the REST snaps?
โ04-11-2019 01:50 PM
We did use the box.com snap in a trial and successfully posted a file, however, given a limited budget, was hoping to not have to purchase the box snappack if there wasnโt a need and the REST API could do the trick.
โ04-12-2019 06:33 AM
Same here. Our organization doesnโt have the Box Snap Pack, and I was hoping that I could get generic REST POST functionality out of the REST snap pack.