Ok, so this is pretty cool. I played with it a bit more and found some useful tidbits. The documentation for the REST API lists the following endpoints:
- /communities
- /collections
- /items
- /bitstreams
But I found there is also /handle
which is much easier to work with because you don't have to know the internal database ID of a given community / collection / item, etc... you can just work using the same IDs you're used to from the DSpace front end.
DSpace Test has the REST webapp running here: https://cgspace.cgiar.org/rest
For example, given a collection 10568/3547
(CCAFS Journal Articles), we can get a list of its items using the /handle/
endpoint: /handle/10568/3547
<collection>
<expand>parentCommunityList</expand>
<expand>parentCommunity</expand>
<expand>license</expand>
<expand>logo</expand>
<expand>all</expand>
<handle>10568/3547</handle>
<ID>313</ID>
<name>CCAFS Journal Articles</name>
<type>collection</type>
<copyrightText/>
<introductoryText>
<strong><a href="https://cgspace.cgiar.org/handle/10568/3547/browse?type=dateissued&sort_by=2&order=DESC&rpp=30">View all journal articles</a></strong>
</introductoryText>
<items>
<expand>metadata</expand>
<expand>parentCollection</expand>
<expand>parentCollectionList</expand>
<expand>parentCommunityList</expand>
<expand>bitstreams</expand>
<expand>all</expand>
<handle>10568/33749</handle>
<ID>34886</ID>
<name>
Integrated management practices significantly affect N2O emissions and wheat–maize production at field scale in the North China Plain
</name>
<type>item</type>
<archived>true</archived>
<lastModified>2014-11-04 18:25:11.469</lastModified>
<withdrawn>false</withdrawn>
</items>
From there you can get the handles for the individual items, then drill down to get their metadata (still using the /handle
endpoint): /handle/10568/33749
<item>
<expand>metadata</expand>
<expand>parentCollection</expand>
<expand>parentCollectionList</expand>
<expand>parentCommunityList</expand>
<expand>bitstreams</expand>
<expand>all</expand>
<handle>10568/33749</handle>
<ID>34886</ID>
<name>
Integrated management practices significantly affect N2O emissions and wheat–maize production at field scale in the North China Plain
</name>
<type>item</type>
<archived>true</archived>
<lastModified>2014-11-04 18:25:11.469</lastModified>
<withdrawn>false</withdrawn>
</item>
It gets interesting when you expand the result set. For example, you can expand the items to get their full metadata, ?expand=all
, or perhaps the bitstreams, ?expand=bitstreams
. From there, getting their thumbnails is super easy: /bitstreams/22635/retrieve