REST API Harvest

119 views
Skip to first unread message

Michel de Lange

unread,
Aug 30, 2016, 6:47:04 PM8/30/16
to DSpace Community
Hi,

I am new to the DSpace, and I need some advice on how to use the REST APIs. I believe they are installed, because I can see http://xx....xxx:8080/rest/communities  and I can see the expected XML output. When it comes to
../rest/stats   or ..rest/harvest however, I get error 404. Yet this page https://jspace.atlassian.net/wiki/display/DSPACEAPI/API+Documentation   says that this should work. Would this be an installation issue, or am I making the call in the wrong way?

Many thanks,

Michel
  

Michel de Lange

unread,
Aug 31, 2016, 4:48:08 AM8/31/16
to DSpace Community
I have a similar problem when I try the OAI-PMH api. When I try url http://xx.xxx.xxx.xxx:8080/dspace-oai/request?verb=ListMetadataFormats

I get a error page, which says "page cannot be found"

Is this an installation problem? 

Many thanks,


Michel

emilio lorenzo

unread,
Aug 31, 2016, 5:52:08 AM8/31/16
to dspace-c...@googlegroups.com

Hi

jspace is a module developed by wijiti (as far i can remember) for integration between dspace an jommla  but using and old REST interface, not used in recent versions, so the documentation will not be comparable..

I´d rather use the recent REST interface documentation  (https://wiki.duraspace.org/display/DSDOC5x/REST+API) for testing and implementing.

Thanks and good luck

Emilio

--
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To post to this group, send email to dspace-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-community.
For more options, visit https://groups.google.com/d/optout.

Christian Völker

unread,
Sep 1, 2016, 2:58:12 AM9/1/16
to Michel de Lange, DSpace Community
Hello,
Not necessarily. Take a look to your webapps directory, where Tomcat or whichever JSP container you use serves your apps from. Is there a subdirectory "oai" or similar?

Your URL would work if the subdirectory would be called dspace-oai which is the directory name in the source directory, but not in for the app built from this directory. The shorter "oai" is the standard name and most likely in your case as well.

There is also a chance that you just did not build the oai app or removed it from the webapps for shorter startup times. Then you should do a new build with standard settings.

There are still other issues possible with your URL like port number or protocol wrong. Compose the URL as follows:

Can you open your DSpace homepage with something like

http://xx.xxx.xxx.xxx:8080 or
http://xx.xxx.xxx.xxx:8080/jspui or
http://xx.xxx.xxx.xxx:8080/xmlui ?

Then add /oai as a second part:

http://xx.xxx.xxx.xxx:8080/oai

and the verb as a third part:

http://xx.xxx.xxx.xxx:8080/oai/request?verb=ListMetadataFormats

You should get XML output to your browser.

Bye, Christian

Michel de Lange

unread,
Sep 1, 2016, 4:35:10 PM9/1/16
to DSpace Community
Thank you for your help with this, I very much appreciate it.

I think the problem was that I was looking at some obsolete documentation, and the /harvest endpoint does not exist anymore, and for OAI, I need to myi-/oai/request?..   etc, an I was looking at /dspace-oai/

Now it works out of the box. But this still puzzles me: When I look at 


I get this error:

ListRecords verb must receive the metadataPrefix parameter

while clearly the parameter is there. 

I believe oai_dc is always supported in any OAI implementation, and anyway, when I do
ListMetadataFormats, then 

<metadataPrefix>oai_dc</metadataPrefix> 

is indeed among the outputs.

So I wonder why this is not working.

Thank you again,


Michel  


Michel de Lange

unread,
Sep 5, 2016, 7:02:15 PM9/5/16
to DSpace Community
This problem has gone away. Must have done something wrong before. Thanks.

Reply all
Reply to author
Forward
0 new messages