Hi Anis,
I did a quick read-through of the code for SimpleREST for DSpace.
First-off, cheers, thank you for sharing your work. I'll second the notion
that activity in the topic of REST API for DSpace is a good thing.
Some of my key take-aways are:
- This uses Restlet as the rest api engine. This is a pretty promising
framework to work with.
- Looks to support all endpoints and many actions
- Is Create / Read / Update / Delete
- Uses stubs to represent DSpaceObjects, into generic objects to aid in
serializing
- Supports JSON, XML/HTML
However, I'm not sure I trust the authentication routine of this...
fi.helsinki.lib.simplerest.BaseResource.java
String s = getContext().getParameters().getFirstValue("adminID");
adminId = Integer.parseInt(s);
Context context = new Context();
EPerson ePerson = EPerson.find(context, adminId);
context.setCurrentUser(ePerson);
I think that adminID is being set in web.xml, thus the REST API, is always
authenticated as who-ever you statically configure that setting to. I'm
thinking that for authentication, we'll want the client to the API, to
provide a key/token/username-password to prove they are that user with
great powers.
The amount of effort going into the serialization process (specifically for
XML) looks quite cumbersome.
Peter Dietz
On Wed, Oct 9, 2013 at 1:29 AM, Anis <[email protected]> wrote:
> As everyone knows, there are several different REST interfaces
> available for DSpace. The National Library of Finland started to code
> its own SimpleREST in year 2010. This message is to announce that the
> code has been updated to work with DSpace version 3.x, improved and is
> now available in the GitHub:
>
> https://github.com/anis-moubarik/SimpleREST
>
> The documentation and test code are still work in progress but we
> already have continuous integration:
>
> https://travis-ci.org/anis-moubarik/SimpleREST
>
> Some features of SimpleREST:
> - licensed under LGPL (version 2.1 or later)
> - supports both JSON and XML formats
> - resources available include communities, collections, items,
> bundles, bitstreams, metadata schemas and metadata fields
> - the GET method is available for anybody, POST, PUT and DELETE
> methods are password protected
> - uses Restlet Framework (http://restlet.org/)
>
> About me:
> My name is Anis Moubarik and I'm working for the National Library of
> Finland and the main developer on SimpleREST. You can send me
> questions, issues or suggestions to [email protected] or raise
> issues at the projects github page.
> Anis Moubarik
> Tietojärjestelmäasiantuntija
> Kansalliskirjasto, kirjastoverkkopalvelut
> PL 26 (Teollisuuskatu 23, huone C 478), 00014 Helsingin yliopisto
> puhelin 09 191 44123, 050 4160386
> s-posti [email protected]
> http://www.kansalliskirjasto.fi/
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette