Hi Peter,
Somehow I missed that reply – great, that did the trick!
Thanks a lot,
Gary
From: Peter Dietz [mailto:[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]<mailto:[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]<mailto:[email protected]>]
> Sent: Wednesday, 11 July 2012 4:17 PM
> To:
> [email protected]<mailto:[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]<mailto:[email protected]>]
> >> Sent: Tuesday, 10 July 2012 5:32 AM
> >> To:
> >> [email protected]<mailto:[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<tel:%2B61%20%280%29%208%206398%205010>
> >> e. [email protected]<mailto:[email protected]>
> >> w. www.wijiti.com<http://www.wijiti.com>
> >> vcard.
> >> www.wijiti.com/vcard/haydenyoung.vcf<http://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]<mailto:[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]<mailto:[email protected]>
> > https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
> --
> Hayden Young
> Managing Director
> Wijiti Pty Ltd
> p. +61 (0) 8 6398 5010<tel:%2B61%20%280%29%208%206398%205010>
> e. [email protected]<mailto:[email protected]>
> w. www.wijiti.com<http://www.wijiti.com>
> vcard.
> www.wijiti.com/vcard/haydenyoung.vcf<http://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]<mailto:[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]<mailto:[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