DSpace / RestContract

REST Contract for DSpace 7-8
https://wiki.lyrasis.org/display/DSDOC8x/
38 stars 48 forks source link

Add documentation for bitstreams/<:uuid>/download #224

Closed MW3000 closed 1 year ago

MW3000 commented 1 year ago

Add documentation for bitstreams/<:uuid>/download. It is missing from bitstreams.md.

tdonohue commented 1 year ago

@MW3000 : I think you've confused the User Interface path with a REST API endpoint. There is no REST API endpoint at /bitstreams/<:uuid>/download.

When downloading a file, there's two main URLs you hit:

  1. [dspace.ui.url]/bitstreams/<:uuid>/download - This is a User Interface URL.
  2. If you go to that /download URL in the User Interface, it's actually a proxy for [dspace.server.url]/api/core/bitstreams/<:uuid>/content. This is the REST API URL.

So, /content is the only REST API endpoint which can download a bitstream. It is documented already: https://github.com/DSpace/RestContract/blob/main/bitstreams.md#content

The /download URL you see is simply in the user interface. It is not a REST endpoint and should not be used as such. Hopefully that makes sense!

Closing as "won't fix".

MW3000 commented 1 year ago

Thank you for the explanation, @tdonohue. I was too quick at opening the issue and should have done more research first. It makes perfectly sense of course.