Sample REST Interface App on Ruby on Rails

42 views
Skip to first unread message

Bruno Nocera Zanette

unread,
Sep 29, 2016, 3:36:51 PM9/29/16
to DSpace REST
Hey folks,
I've posted it on dspace-tech list, but then i've remenbered that this list exists. Maybe there are some people here that aren't there, so i'll repost it here resuming what i've wrote there.

Long story short, i've been writting a RoR app that uses 'dspace-rest-client' rubygem (developed by me and other fellows of mine) and it's finally complete. It implements all the DSpace's 6 REST API endpoints and it's fully functional, including authentication and all CRUD operations. The only thing that are implemented in the gem but not on the app are objects's policies.

You may access it here:
https://drcgem-sample-interface.herokuapp.com

The code, for people that know something about RoR, is very simple, being almost identical to a ActiveRecord based one. This made me think about including the fake AR methods to gem so that it would be pratically invisible for the programmer, but this is something for the future.

This is not meant to be an official DSpace's REST interface but i think it's a good example of what it can do and a good start point for other projects, that is for me the greatest advantage of REST API. IMO, depending on the situation, creating a simple app that implements a custom interface is a better solution than customizing the whole interface. And to use the default interface only internally to do admin stuff.

The 'dspace-rest-client' rubygem will be update in the next few days, because we're still working to make both API verions 5 and 6 to work alongside each other,  but for now you may use my repository's version (https://gitlab.c3sl.ufpr.br/bnzanette/dspace-rest-client).

Cheers!
Reply all
Reply to author
Forward
0 new messages