OAI-PMH URIs in DSpace
It seems every time I need to query the DSpace OAI-PMH (Open Archives Initiative Protocol for Metadata Harvesting) interface, I begin with a Google search because I have forgotten the syntax. This post is mainly documentation for myself, but I am making it public so that other folks with memories short as mine will have a go-to reference.
The following URIs work for the IDEALS repository at the University of Illinois Urbana. The PHM verbs etc should work everywhere.
OAI-PMH Verbs
Identify
The first step is to make sure the base URI is correct and there is, indeed, an OAI-PHM service running. Note: capitalization is important.
https://ideals.illinois.edu/dspace-oai/request?verb=Identify
All other requests will use the same base URI.
ListSets
The ListSets verb is particularly useful for figuring out set syntax. In the DSpace world, a community or collection may qualify as a set.
https://ideals.illinois.edu/dspace-oai/request?verb=ListSets
The response lists all the sets and their titles. The thing to note here is the setSpec syntax (e.g., hdl_2142_2280). This set corresponds to the DSpace community or collection with the handle (e.g.) 2142/2280.
Response:
…
<request verb="ListSets">https://ideals.illinois.edu/dspace-oai/request</request>
<ListSets>
<set>
<setSpec>hdl_2142_5167</setSpec>
<setName>1940: Illinois Agricultural Statistics</setName>
</set>
<set>
<setSpec>hdl_2142_5168</setSpec>
<setName>1945: Illinois Agricultural Statistics</setName>
</set>
…
ListMetadataFormats
Before retrieving any records, there is one more thing to check. What metadata formats do the repository support?
https://ideals.illinois.edu/dspace-oai/request?verb=ListMetadataFormats
Response:
…
<request verb="ListMetadataFormats">https://ideals.illinois.edu/dspace-oai/request</request>
<ListMetadataFormats>
<metadataFormat>
<metadataPrefix>oai_dc</metadataPrefix>
<schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
<metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
</metadataFormat>
<metadataFormat>
<metadataPrefix>rdf</metadataPrefix>
<schema>http://www.openarchives.org/OAI/2.0/rdf.xsd</schema>
<metadataNamespace>http://www.openarchives.org/OAI/2.0/rdf/</metadataNamespace>
</metadataFormat>
<metadataFormat>
<metadataPrefix>mets</metadataPrefix>
<schema>http://www.loc.gov/standards/mets/mets.xsd</schema>
<metadataNamespace>http://www.loc.gov/METS/</metadataNamespace>
</metadataFormat>
…
The metadata formats supported by IDEALS are OAI-Dublin Core, RDF and METS, which use the metadata prefixes oai_dc, rdf and mets.
ListRecords
The URI for obtaining a list all the records associated with a community or collection in DSpace requires the ListRecords verb, the set identifier (or setSpec) and the metadataPrefix. The handle for the University of Illinois Dissertations and Theses collection is 2142/5131. Its corresponding set identifier is hdl_2142_5131.
List all the records (DSpace items) in the University of Illinois Dissertations and Theses collection, with metadata in Dublin Core.
https://ideals.illinois.edu/dspace-oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=hdl_2142_5131
Response:
…
<request set="hdl_2142_5131" metadataPrefix="oai_dc" verb="ListRecords">https://ideals.illinois.edu/dspace-oai/request</request>
<ListRecords>
<record>
<header>
<identifier>oai:www.ideals.illinois.edu:2142/3468</identifier>
<datestamp>2009-09-12T21:13:26Z</datestamp>
<setSpec>hdl_2142_9</setSpec>
<setSpec>hdl_2142_5131</setSpec>
<setSpec>hdl_2142_13736</setSpec>
</header>
<metadata>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:contributor>Cole, Jennifer S.</dc:contributor>
<dc:contributor>Sproat, Richard W.</dc:contributor>
<dc:creator>Koo, Hahn</dc:creator>
<dc:date>2007-12-11T01:07:40Z</dc:date>
<dc:date>2007-12-11T01:07:40Z</dc:date>
<dc:date>2007-12</dc:date>
<dc:identifier>http://hdl.handle.net/2142/3468</dc:identifier>
<dc:language>en</dc:language>
<dc:subject>Linguistics</dc:subject>
<dc:title>
Change in the adult phonological processing system by learning non-adjacent phonotactic constraints from brief experience: An experimental and computational study
</dc:title>
<dc:type>text</dc:type>
<dc:type>dissertation/thesis</dc:type>
<dc:description>unpublished</dc:description>
<dc:description>not peer reviewed</dc:description>
<dc:contributor>Sproat, Richard W.</dc:contributor>
<dc:contributor>Dell, Gary S.</dc:contributor>
<dc:contributor>Fisher, Cynthia L.</dc:contributor>
</oai_dc:dc>
</metadata>
</record>
…
GetRecord
Note the identifier element in the response above (//record/header/identifier). Use this identifier to view the single record.
The URI is similar to ListRecords in that it requires a metadataPrefix. The other required parameter is identifier. This time, display the record with METS metadata (w/MODS embedded).
https://ideals.illinois.edu/dspace-oai/request?verb=GetRecord&metadataPrefix=mets&identifier=oai:www.ideals.illinois.edu:2142/3468
Happy harvesting!

Bill Ingram

















