Hi Peter,

Thanks for clarifying! I must have overlooked that feature (I think most 
of the examples I had seen before were all DB ID based, and so that's 
how I was using REST).

In that case, I think we are "good enough" for 4.0. For 5.0 we can work 
on improvements to our local identifiers (DS-1782)

- Tim

On 11/15/2013 11:01 AM, Peter Dietz wrote:
> Example: http://demo.dspace.org/rest/handle/10673/1?expand=all
>
> Peter Dietz
>
>
> On Fri, Nov 15, 2013 at 12:00 PM, Peter Dietz <pdiet...@gmail.com
> <mailto:pdiet...@gmail.com>> wrote:
>
>     Sorry, but the current REST API does support lookup by handles.
>     https://github.com/DSpace/DSpace/tree/master/dspace-rest#handles
>
>     
> https://github.com/DSpace/DSpace/blob/master/dspace-rest/src/main/java/org/dspace/rest/HandleResource.java#L32
>
>     @Path("/handle")
>     public class HandleResource {
>
>
>     @GET
>     @Path("/{prefix}/{suffix}")
>
>
>
>     @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>
>
>
>     public org.dspace.rest.common.DSpaceObject
>     getObject(@PathParam("prefix") String prefix, @PathParam("suffix")
>     String suffix, @QueryParam("expand") String expand) {
>
>
>
>
>     It should work just-as-well as looking it up by DB-id. With the
>     exception that we haven't added the pagination params to the Handle
>     lookup. The handle returns either 404, or an object of the type as
>     the found DSO, i.e. <Community>, <Collection, or <Item>
>
>     Peter Dietz
>
>
>     On Fri, Nov 15, 2013 at 11:36 AM, Anja Le Blanc
>     <anja.lebl...@manchester.ac.uk
>     <mailto:anja.lebl...@manchester.ac.uk>> wrote:
>
>         It is very easy to make the REST API understand handles. I have
>         done it
>         for items locally already. At the moment it is in addition to
>         database
>         ids, but I would be happy for DB ids to disappear from view
>         completely.
>
>         Best regards,
>         Anja
>
>         On 15/11/2013 16:08, Tim Donohue wrote:
>          > Hi Mark,
>          >
>          > On 11/13/2013 12:06 PM, Mark H. Wood wrote:
>          >> I had missed that we were hurrying to do something in 4.0.
>           I had
>          >> assumed that there wasn't time.
>          >
>          > To clarify, I was not recommending we change identifier
>         schemes in 4.0.
>          >
>          > As Graham mentions, all I was recommending is that we stay
>         *consistent*
>          > with our current identifier scheme.
>          >
>          > So, the only change I recommend for 4.0 is to change the
>         REST-API to
>          > accept Handles ([prefix]/[suffix]) as the identifier.
>           Currently the
>          > REST-API only works with Database IDs.
>          >
>          > As noted earlier in this thread, using Database IDs for the
>         REST API has
>          > several limitations:
>          >
>          > (1) Database ID is not very easily "discoverable" to end
>         users. So, if a
>          > user wanted to access this item from the REST API:
>          >
>          > http://demo.dspace.org/xmlui/handle/10673/3
>          >
>          > How would they be able to determine that it is actually
>         available at:
>          >
>          > http://demo.dspace.org/rest/items/2
>          >
>          > (The same goes for specific Communities/Collections -- the ID
>         from REST
>          > is almost always going to be different from the Handle ID)
>          >
>          > (2) As mentioned previously, Database IDs are slightly more
>         fragile than
>          > Handles currently -- e.g. they cannot be restored by AIP
>         backup & restore.
>          >
>          > I hope this makes some sense. All I'm recommending for 4.0 is
>         that we
>          > tweak the REST API to understand Handles (either instead of or in
>          > addition to Database IDs).  For 5.0, we should investigate a
>         better
>          > resolution for https://jira.duraspace.org/browse/DS-1782 (and
>         related
>          > issues)
>          >
>          > - Tim
>          >
>          >
>         
> ------------------------------------------------------------------------------
>          > DreamFactory - Open Source REST & JSON Services for HTML5 &
>         Native Apps
>          > OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External
>         API Access
>          > Free app hosting. Or install the open source package on any
>         LAMP server.
>          > Sign up and see examples for AngularJS, jQuery, Sencha Touch
>         and Native!
>          >
>         
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>          > _______________________________________________
>          > Dspace-devel mailing list
>          > Dspace-devel@lists.sourceforge.net
>         <mailto:Dspace-devel@lists.sourceforge.net>
>          > https://lists.sourceforge.net/lists/listinfo/dspace-devel
>          >
>          >
>
>         
> ------------------------------------------------------------------------------
>         DreamFactory - Open Source REST & JSON Services for HTML5 &
>         Native Apps
>         OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API
>         Access
>         Free app hosting. Or install the open source package on any LAMP
>         server.
>         Sign up and see examples for AngularJS, jQuery, Sencha Touch and
>         Native!
>         
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>         _______________________________________________
>         Dspace-devel mailing list
>         Dspace-devel@lists.sourceforge.net
>         <mailto:Dspace-devel@lists.sourceforge.net>
>         https://lists.sourceforge.net/lists/listinfo/dspace-devel
>
>
>
>
>
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Dspace-devel mailing list
> Dspace-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-devel
>

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to