I've made some progress on the DSpace-Rest Client I swore I was going to
build.

I've chosen Play! Framework to get started, and I've tossed my code thus
far up on GitHub.
https://github.com/peterdietz/dspace-rest-play

The Rest-Client dspace-rest-play is very basic thus far, but I was able to
successfully connect, and test out a few endpoints. Thus far, I've tested
out the Community List, and a Community-Detail page. Its easy. To get the
community list, just ask for that endpoint, then wrap all that data into an
html list. I've made each one a link to its community-detail-page. The
community page has more info like: shortDescription, introductoryText,
handle, copyrightText...

I couldn't get all communities to work from the REST API. I only tested my
top-level-communities, but some of them error out with:

WARN Could not process entity: /communities/940 (404)[null]: Attempted to
access an entity URL path (/communities/940.json) for an entity
(/communities/940) that does not exist

Which is odd, because it actually exists. I'll need to dig in more to the
dspace-rest community controller to see if I can't track down a bug. Its
likely that something could be upset that I don't have the asset-store on
my laptop.

Peter Dietz



On Sun, Jul 22, 2012 at 6:30 PM, Gary Browne <[email protected]>wrote:

>  Hi Peter, Hayden and anyone else involved with this development.****
>
> ** **
>
> Just wanted to say thanks to you all – it looks very promising and I think
> has great potential.****
>
> ** **
>
> Regards,
> Gary****
>
> ** **
>
> *From:* Hayden Young [mailto:[email protected]]
> *Sent:* Tuesday, 17 July 2012 6:08 PM
>
> *To:* Gary Browne
> *Cc:* dspace-tech Tech
> *Subject:* Re: [Dspace-tech] DSpace REST API****
>
>  ** **
>
> Hi Gary
>
> Good to hear you got it working.
>
> Hi Peter
>
> Yes, there should be separate count endpoints for endpoints such as /items
> and /communities (E.g. /items/count and /communities/count). I'm working on
> a CMS-based UI for DSpace but haven't had time to revisit the Github-based
> API; I'm hoping to revisit in the next 4 - 6 weeks when things quieten down
> and will test these endpoints thoroughly. I will also update the
> documentation (it is currently missing docs for sort parameters from the
> various list endpoints).
>
> Cheers
>
>
> Hayden****
>
> On 17/07/12 08:51, Gary Browne wrote:****
>
> Hi Peter,****
>
>  ****
>
> Somehow I missed that reply – great, that did the trick!****
>
>  ****
>
> Thanks a lot,****
>
> Gary****
>
>  ****
>
> *From:* Peter Dietz [mailto:[email protected] <[email protected]>]
> *Sent:* Tuesday, 17 July 2012 12:56 AM
> *To:* Gary Browne
> *Cc:* dspace-tech Tech
> *Subject:* Re: [Dspace-tech] DSpace REST API****
>
>  ****
>
> Hi Gary,****
>
>  ****
>
> Regarding fixing your 500 error, see my previous response for how to fix
> it. Either my catalina.log or dspace.log (I forget which) was saying that I
> had my database config settings wrong instead of my
> /dspace/config/dspace.cfg, it was looking for a
> /devel/dspace/config/dspace.cfg.****
>
>  ****
>
> Also, I think you are supposed to run 
> create_integration_test_db.sh<https://github.com/hedtek/dspace-rest/blob/master/create_integration_test_db.sh>
> ****
>
>  ****
>
> ======****
>
>  ****
>
> I did spend a little bit of time trying to build some type of client user
> interface based off of REST. I couldn't decide if there was a "best"
> language/framework for doing this easily, so I just started playing with
> Play! Framework to make some HTTP requests to the API. It was fairly easy
> to get started, and it has pre-included support for parsing JSON.****
>
>  ****
>
> A few "bugs" perhaps... ?****
>
>  ****
>
> The documentation says there is a method to get the count of the number of
> total collections.
> https://jspace.atlassian.net/wiki/display/DSPACEAPI/GET_collections_count*
> ***
>
>  ****
>
> However, accessing that endpoint didn't seem to do anything, except for
> error out that it didn't exist.****
>
> http://localhost:8080/rest/collections/count.xml****
>
> Same with communities/count.xml****
>
>  ****
>
>  ****
>
> When trying to dig deeper, and get the count number of items in a
> collection, I also ran into issues. ****
>
>  ****
>
> collections/:id:/items/count.format****
>
> just gave me the same data as****
>
> collections/:id:/items.format****
>
>  ****
>
> If anyone has any app they've written to help test the REST API then I'd
> be interested in it. (I'm thinking more an app the resembles a DSpace user
> interface, then a Unit test). I started to look at the GSOC 2011 Rest
> Client, so I suppose that could be something to look at.****
>
>  ****
>
> Peter Dietz
>
>
>
> ****
>
> On Mon, Jul 16, 2012 at 12:58 AM, Gary Browne <[email protected]>
> wrote:****
>
> Hi Hayden,
>
> Yes, like helix84 said, I can get a .war output that way which unpacks ok
> under Tomcat. But I'm new to REST and need some pointers on how to test it.
>
> What I started with was issuing URIs to a browser (just manually entering
> them):
>
> http://$dev-server/rest/
>
> This results in a "describe" page being displayed. Promising, I thought.
> Let's try one of the entities. When I clicked on communities or communities
> (xml), once again I get describe pages displaying in the browser. Great.
>
> Now if I try something like:
>
> http://$dev-server/rest/communities
>
> I get a blank page. The catalina log is attached. Would you have any idea
> what's going on here?
>
> I even tried a simple curl script in PHP and didn't get any errors, but
> also produced a blank page output.****
>
>
> Thanks a lot,
> Gary
>
>
>
> > -----Original Message-----
> > From: Hayden Young [mailto:[email protected]]****
>
> > Sent: Wednesday, 11 July 2012 4:17 PM
> > To: [email protected]
> > Subject: Re: [Dspace-tech] DSpace REST API
> >****
>
> > Hi Gary
> >
> > Please try changing the following line in your pom.xml from:
> >
> > <version>1.8.1</version>
> >
> > to:
> >
> > <version>1.8.2</version>
> >
> > and see if that solves your issue.
> >
> > Cheers
> >
> >
> > Hayden
> >
> > On 10/07/12 09:55, Gary Browne wrote:
> > > Hi Hayden,
> > >
> > > I'm keen to try this out, however I am unable to install it - should
> it run ok
> > on 1.8.2?
> > >
> > > On building (mvn package), I get the following error:
> > >
> > > [INFO] Unable to find resource 'org.dspace:dspace-rest:war:1.0' in
> > > repository central (http://repo1.maven.org/maven2) [INFO]
> > > ----------------------------------------------------------------------
> > > --
> > > [ERROR] BUILD ERROR
> > > [INFO]
> > > ----------------------------------------------------------------------
> > > --
> > > [INFO] Failed to resolve artifact.
> > >
> > > Missing:
> > > ----------
> > > 1) org.dspace:dspace-rest:war:1.0
> > >
> > >    Try downloading the file manually from the project website.
> > >
> > >    Then, install it using the command:
> > >        mvn install:install-file -DgroupId=org.dspace
> > > -DartifactId=dspace-rest -Dversion=1.0 -Dpackaging=war
> > > -Dfile=/path/to/file
> > >
> > >    Alternatively, if you host your own repository you can deploy the
> file
> > there:
> > >        mvn deploy:deploy-file -DgroupId=org.dspace
> > > -DartifactId=dspace-rest -Dversion=1.0 -Dpackaging=war
> > > -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
> > >
> > >    Path to dependency:
> > >          1) org.dspace.modules:rest:war:1.8.1
> > >          2) org.dspace:dspace-rest:war:1.0
> > >
> > > ----------
> > > 1 required artifact is missing.
> > >
> > > for artifact:
> > >    org.dspace.modules:rest:war:1.8.1
> > >
> > > from the specified remote repositories:
> > >    central (http://repo1.maven.org/maven2),
> > >    sonatype-nexus-snapshots
> > > (https://oss.sonatype.org/content/repositories/snapshots)
> > >
> > > I'm not clear on what I should do next, are you able to help please?
> > >
> > > Thanks a lot,
> > > Gary
> > >
> > >> -----Original Message-----
> > >> From: Hayden Young [mailto:[email protected]]
> > >> Sent: Tuesday, 10 July 2012 5:32 AM
> > >> To: [email protected]; DSpace Developer List
> > >> Subject: [Dspace-tech] DSpace REST API
> > >>
> > >> After several months of development, Wijiti is pleased to contribute
> > >> this reworked version of the REST API for DSpace 1.8.x.
> > >>
> > >> Details and documentation are available at
> > >> https://jspace.atlassian.net/ and all code is freely available via
> > >> Github, the link of which is in the documentation.
> > >>
> > >> Enjoy.
> > >>
> > >> --
> > >> Hayden Young
> > >> Managing Director
> > >> Wijiti Pty Ltd
> > >> p. +61 (0) 8 6398 5010
> > >> e. [email protected]
> > >> w. www.wijiti.com
> > >> vcard. www.wijiti.com/vcard/haydenyoung.vcf
> > >>
> > >> NOTICE
> > >> This e-mail and any attachments are intended for the addressee(s)
> > >> only and may be confidential. They may contain legally privileged or
> > >> copyright material. You should not read, copy, use or disclose them
> > >> without authorization. If you are not the intended recipient please
> > >> contact the sender as soon as possible by return e-mail and then
> > >> please delete both messages. This notice should not be removed.
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> ---------
> > >> Live Security Virtual Conference
> > >> Exclusive live event will cover all the ways today's security and
> > >> threat landscape has changed and how IT managers can respond.
> > >> Discussions will include endpoint security, mobile security and the
> latest in
> > malware threats.
> > >> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > >> _______________________________________________
> > >> DSpace-tech mailing list
> > >> [email protected]
> > >> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> > > ----------------------------------------------------------------------
> > > --------
> > > Live Security Virtual Conference
> > > Exclusive live event will cover all the ways today's security and
> > > threat landscape has changed and how IT managers can respond.
> > > Discussions will include endpoint security, mobile security and the
> > > latest in malware threats.
> > > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > > _______________________________________________
> > > DSpace-tech mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/dspace-tech
> >
> > --
> > Hayden Young
> > Managing Director
> > Wijiti Pty Ltd
> > p. +61 (0) 8 6398 5010
> > e. [email protected]
> > w. www.wijiti.com
> > vcard. www.wijiti.com/vcard/haydenyoung.vcf
> >
> > NOTICE
> > This e-mail and any attachments are intended for the addressee(s) only
> and
> > may be confidential. They may contain legally privileged or copyright
> > material. You should not read, copy, use or disclose them without
> > authorization. If you are not the intended recipient please contact the
> > sender as soon as possible by return e-mail and then please delete both
> > messages. This notice should not be removed.
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and threat
> > landscape has changed and how IT managers can respond. Discussions will
> > include endpoint security, mobile security and the latest in malware
> threats.
> > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > DSpace-tech mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/dspace-tech****
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech****
>
>  ****
>
>
>
>
> ****
>
> This body part will be downloaded on demand.****
>
>
>
>
> ****
>
> This body part will be downloaded on demand.****
>
>
>
> ****
>
> -- ****
>
> Hayden Young****
>
> Managing Director****
>
> Wijiti Pty Ltd****
>
> p. +61 (0) 8 6398 5010****
>
> e. [email protected]****
>
> w. www.wijiti.com****
>
> vcard. www.wijiti.com/vcard/haydenyoung.vcf****
>
> ** **
>
> NOTICE****
>
> This e-mail and any attachments are intended for the addressee(s) only and 
> may be confidential. They may contain legally privileged or copyright 
> material. You should not read, copy, use or disclose them without 
> authorization. If you are not the intended recipient please contact the 
> sender as soon as possible by return e-mail and then please delete both 
> messages. This notice should not be removed. ****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to