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

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

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

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 pe...@longsight.com wrote: Hi OK, The endpoint to look up an object by its

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 pe...@longsight.com: Hi OK, I've updated the documentation to mention the

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

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 base-rest-url/handle/handle-number. So, for example: https://demo.dspace.org/rest/handle/10673/14?expand=all The /handle/handle-number endpoint doesn't appear to be properly documented. Here is the HandleResource in the code.