Re: [Dspace-tech] REST API get object by handle

2015-08-05 Thread Peter Dietz
Hi Luiz, Getting back XML vs JSON depends on your client's Accept header. If you are using your web browser, it has a preference to accept HTTP, XHTML, XML before it wants to accept JSON. So, viewing endpoints in your browser, you'll usually get back XML. A while back I made a video where I'm usi

Re: [Dspace-tech] REST API get object by handle

2015-08-05 Thread Peter Dietz
Hi Ondřej, I see that there was a code refactoring during the development, which successfully hit the DSpaceObject endpoints ( /items, /collections, /communities), but missed the /handle endpoint). Unintentional caching, a bug. The old way we were obtaining a context in REST is this (visible in ha

Re: [Dspace-tech] REST API get object by handle

2015-07-28 Thread Luiz dos Santos
Hi Peter, When I hit the url: https://demo.dspace.org/rest/handle/10673/14?expand=all it give back a xml instead a json? I mean, should it be a json? Thanks Luiz On Mon, Jul 27, 2015 at 12:37 PM, Peter Dietz wrote: > Hi OK, > > The endpoint to look up an object by its handle is > /handle

Re: [Dspace-tech] REST API get object by handle

2015-07-28 Thread Ondřej Košarko
Hi again, Is it possible that the behavior of /handle is different from that of /items in the sense that when I change metadata from xmlui I see the change immediately with /items but not with /handle. I've tried changing a title of an item https://demo.dspace.org/rest/handle/10673/26?expand=met

Re: [Dspace-tech] REST API get object by handle

2015-07-28 Thread Ondřej Košarko
Hi Peter, thanks for your reply and thanks again for posting the example with the ?expand parameter; I completely missed that part in to documentation. Regards, OK 2015-07-27 19:12 GMT+02:00 Peter Dietz : > Hi OK, > > I've updated the documentation to mention the /handle/{prefix}/{suffix} > endp

Re: [Dspace-tech] REST API get object by handle

2015-07-27 Thread Peter Dietz
Hi OK, I've updated the documentation to mention the /handle/{prefix}/{suffix} endpoint: https://wiki.duraspace.org/display/DSDOC5x/REST+API#RESTAPI-Handle Peter Dietz Longsight www.longsight.com pe...@longsight.com p: 740-599-5005 x809 On Mon, Jul 27, 2015 at 12:37 PM, Peter Di

Re: [Dspace-tech] REST API get object by handle

2015-07-27 Thread Peter Dietz
Hi OK, The endpoint to look up an object by its handle is /handle/. So, for example: https://demo.dspace.org/rest/handle/10673/14?expand=all The /handle/ endpoint doesn't appear to be properly documented. Here is the HandleResource in the code. https://github.com/DSpace/DSpace/blob/master/dspace-

[Dspace-tech] REST API get object by handle

2015-07-24 Thread Ondřej Košarko
Hi all, Is it currently possible, using the dspace5 rest api, to access the items/collections/communities using handles rather than internal-ids? I can see a workaround for items - first find-by-metadata-field. But that seems bit cumbersome. Handles or some other PIDs are already used to referenc