Hello Claudia, Thanks for the tip! I see it works on the demo, but on our dev site, I get a 404 with exactly the same format in the url and with my uuid:
https://my.project.url/rest/items/4da73e7c-1eeb-4772-9648-5c972632e9ad/bitstreams if I use curl on the server itself: curl -s -H "Accept: application/xml" https://localhost:8080/rest/items/4da73e7c-1eeb-4772-9648-5c972632e9ad/bitstreams | xmllint --format - I get this error: -:1: parser error : Document is empty I have not tried to use the rest api until now, and I see I am missing something, something big, and maybe simple. What am I missing? Best regards, Paul On Mon, Jan 15, 2018 at 2:01 PM, Claudia Jürgen < [email protected]> wrote: > Hi Paul, > > as the name must not be unique, you will need the UUID or legacy ID to > delete a bitstream. > You may get a list of all bistreams belonging to an item via the REST API > https://demo.dspace.org/rest/ > GET /items/{item id}/bitstreams - Return bitstreams of the specified item. > e.g. > https://demo.dspace.org/rest/items/99819176-b29f-4d18-a4e1-9 > bf6b93bb443/bitstreams > > Hope this helps > > Claudia Jürgen > > > > Am 15.01.2018 um 13:27 schrieb Paul Warner: > >> Hi, >> >> I want to delete a bitstream from an item. I have a delete_contents file >> inside my SimpleArchiveFormat folder. The delete_contents file has the >> filename of the file I want to delete, but I get an error message that >> indicates the uuid is needed, not the name of the file. How do I get the >> uuid of the file from the command line? >> >> Below is the command and the error message. >> >> Best regards, >> Paul >> >> >> command: >> >> bin/dspace itemupdate -e [email protected] -s >> /opt/dspace/SimpleArchiveFormat_421000732 --deletebitstreams >> >> Error message: >> >> Exception processing item item_1: java.lang.IllegalArgumentException: >> Invalid UUID string: test_421000732.pdf >> java.lang.IllegalArgumentException: Invalid UUID string: >> test_421000732.pdf >> at java.util.UUID.fromString(UUID.java:194) >> at >> org.dspace.content.BitstreamServiceImpl.findByIdOrLegacyId(B >> itstreamServiceImpl.java:426) >> at >> org.dspace.content.BitstreamServiceImpl.findByIdOrLegacyId(B >> itstreamServiceImpl.java:41) >> at >> org.dspace.app.itemupdate.DeleteBitstreamsAction.execute(Del >> eteBitstreamsAction.java:66) >> at org.dspace.app.itemupdate.ItemUpdate.processArchive(ItemUpda >> te.java:442) >> at org.dspace.app.itemupdate.ItemUpdate.main(ItemUpdate.java:355) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >> ssorImpl.java:62) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >> thodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:498) >> at >> org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptL >> auncher.java:229) >> at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81) >> >> > -- > Claudia Juergen > Eldorado > > Technische Universität Dortmund > Universitätsbibliothek > Vogelpothsweg 76 > 44227 Dortmund > > Tel.: +49 231-755 40 43 > Fax: +49 231-755 40 32 > [email protected] > www.ub.tu-dortmund.de > > Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie > ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für > diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender > und vernichten Sie diese Mail. Vielen Dank. > Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen > ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher > Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung eines > solchen Schriftstücks per Telefax erfolgen. > > Important note: The information included in this e-mail is confidential. > It is solely intended for the recipient. If you are not the intended > recipient of this e-mail please contact the sender and delete this message. > Thank you. Without prejudice of e-mail correspondence, our statements are > only legally binding when they are made in the conventional written form > (with personal signature) or when such documents are sent by fax. > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "DSpace Technical Support" group. > To unsubscribe from this topic, visit https://groups.google.com/d/to > pic/dspace-tech/iP9a_8Lk89U/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/dspace-tech. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
