-
Re: Copying files from one group to another via REST API?
max.calderon Aug 26, 2013 1:37 PM (in response to ignacio) -
Re: Copying files from one group to another via REST API?
nilsheuer Aug 27, 2013 10:23 PM (in response to ignacio)The error message is a good pointer. You are getting a 401 as the request made by the doUpload option of the attachment is not authenticated with the Jive server.
Two options here:
1. There may be an option to pass authentication information to the attachment upload. I could not find anything in the documentation, but maybe someone from Jive can check this.
2. Download the attachment first, and the upload it in a separate step. Not as elegant, as there is additional network traffic and you'll have to clean up the file afterwards, but this will definitely work.
-
Re: Copying files from one group to another via REST API?
ignacio Aug 28, 2013 11:16 AM (in response to nilsheuer)Thanks a lot, Nils! Regarding your points:
- @Jive team: Can you shed any light on this? Thanks!
- Agreed, not as elegant but probably possible. Any ideas on how to do this when the entity making the REST calls is a Salesforce page?
Thanks a lot to everyone!
-
Re: Copying files from one group to another via REST API?
ignacio Aug 31, 2013 3:27 AM (in response to ignacio)Hi! Option 2 above (downloading and uploading again) turns out to be very cumbersome...
Surely, there must be an easier way to automatically copy a file from one group to another via the REST API?
Max Calderon, Mark Weitzel, Ryan Rutan, Gil Rice : Any help would be much appreciated and surely also very helpful to the whole Developer community.
Thank you so much in advance! Best regards,
Ignacio
-
Re: Copying files from one group to another via REST API?
Ryan Rutan Aug 31, 2013 5:27 AM (in response to ignacio)Ignacio,
I'll take a look at the APIs for this use case early next week. For the most part, this is your best option, so you are going in the right direction, but since I haven't done this explicitly before (in this manner), I want to kick the tires myself to see.
My initial response is that if they are binary files; it will be slow due to the REST transfer of the stream.
-
Re: Copying files from one group to another via REST API?
ignacio Sep 1, 2013 4:04 PM (in response to Ryan Rutan)Hi Ryan, thanks a lot for your reply and I very much look forward to your solution! Ignacio
-
Re: Copying files from one group to another via REST API?
Ryan Rutan Sep 3, 2013 7:06 AM (in response to ignacio)1 person found this helpfulWas able to read the entire thread this morning, and get caught up on the context of the use-case. Nils Heuer is correct. The stream you are trying to access is not permitted, as the request is originating from the system, not the client. One test would be to embed credentials into the URL in HTTP Basic form, https://user:pass@url ... This should allow the server to pass along the identity context back to itself... This is unfortunately just a test. If it works, it means that you have 2 options. Download the file as Nils suggested (which will incur the network transmit time), or make a public version of the file available for download at all times (or one that is not protected by the APIS) or not protected by security in Jive.
-
Re: Copying files from one group to another via REST API?
ignacio Sep 4, 2013 11:06 AM (in response to Ryan Rutan)Ok, thanks a lot for getting back to me, Ryan Rutan! So there is really no easy way to copy files in Jive via the REST API...?
-
Re: Copying files from one group to another via REST API?
Ryan Rutan Sep 4, 2013 11:24 AM (in response to ignacio)It doesn't look like it at the moment, if the asset is non-public.
-
Re: Copying files from one group to another via REST API?
ignacio Sep 7, 2013 11:50 AM (in response to Ryan Rutan)Ok, thanks a lot again for checking this. Best, Ignacio
-
-
-
-
-
-
-