Community:NDR/getMultiple
From NSDLWiki
Contents[hide] |
getMultiple
Returns either a profile of each object or an XML datastream for each object that is specified in a list of handles.
Request URL
- http://ndr.nsdl.org/api/getMultiple/[datastreamName]
- where [datastreamName] are defined in the Arguments section.
- Must be an HTTP POST request.
Arguments
Parameters on Request URL:
- [datastreamName] (optional) - the name of the datastream to get from the NDR object.
Post Parameters for Request:
- handles (required) - a list of handles for objects to be retrieved.
Request URL Example
Below is an example of a request URL for getMultiple.
http://ndr.nsdl.org/api/getMultiple http://ndr.nsdl.org/api/getMultiple/DC
InputXML Example
Below is an example of InputXML for getMultiple. The inputXML is the same whether or not the datastreamName is specified.
<?xml version="1.0" encoding="UTF-8"?>
<inputXML
xmlns="http://ns.nsdl.org/ndr/request_v1.00/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ns.nsdl.org/ndr/request_v1.00/ http://ns.nsdl.org/schemas/ndr/request_v1.00.xsd"
schemaVersion="1.00.000">
<handles>
<handle>2200/20090325164605402T</handle>
<handle>2200/20090730110108336T</handle>
</handles>
</inputXML>
Response Example
The following is an example response when a datastreamName is not specified.
<NSDLDataRepository schemaVersion="1.00.000"
xmlns="http://ns.nsdl.org/ndr/response_v1.00/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ns.nsdl.org/ndr/response_v1.00/ http://ns.nsdl.org/schemas/ndr/response_v1.00.xsd">
<responseTime>2010-10-11T20:36:35Z</responseTime>
<requestURL>/repository/api/getMultiple</requestURL>
<resultData>
<objectList>
<object handle="2200/20090325164605402T">
<NDRObject
xmlns:auth="http://ns.nsdl.org/ndr/auth#"
xmlns:fedora-model="info:fedora/fedora-system:def/model#"
xmlns:fedora-view="info:fedora/fedora-system:def/view#" xmlns:nsdl="http://ns.nsdl.org/api/relationships#">
<properties>
<fedora-view:createdDate>2009-03-25T20:46:05.517Z</fedora-view:createdDate>
<fedora-view:lastModifiedDate>2010-06-03T00:10:48.034Z</fedora-view:lastModifiedDate>
<fedora-model:state>Active</fedora-model:state>
<nsdl:hasHandle>2200/20090325164605402T</nsdl:hasHandle>
<nsdl:objectType>Aggregator</nsdl:objectType>
</properties>
<data>
<DC ID="DC" LABEL="Dublin Core Metadata" MIMETYPE="text/xml" canonical="true">http://ndr.nsdlib.org/api/get/2200/20090325164605402T/DC</DC>
<serviceDescription ID="serviceDescription" LABEL=""
MIMETYPE="application/xml" canonical="true">http://ndr.nsdlib.org/api/get/2200/20090325164605402T/serviceDescription</serviceDescription>
</data>
<relationships>
<auth:authorizedToChange>2200/20091105132121677T</auth:authorizedToChange>
<auth:authorizedToChange>2200/NCS</auth:authorizedToChange>
<nsdl:aggregatorFor>2200/NCS</nsdl:aggregatorFor>
<auth:authorizedToChange>2200/NSDL_Harvest_Ingest</auth:authorizedToChange>
<nsdl:memberOf>2200/NSDL_Collection_of_Collections_Aggregator</nsdl:memberOf>
<nsdl:associatedWith>2200/20080401174210211T</nsdl:associatedWith>
</relationships>
</NDRObject>
</object>
<object handle="2200/20090730110108336T">
<NDRObject
xmlns:auth="http://ns.nsdl.org/ndr/auth#"
xmlns:fedora-model="info:fedora/fedora-system:def/model#"
xmlns:fedora-view="info:fedora/fedora-system:def/view#" xmlns:nsdl="http://ns.nsdl.org/api/relationships#">
<properties>
<fedora-view:createdDate>2009-07-30T15:01:08.453Z</fedora-view:createdDate>
<fedora-view:lastModifiedDate>2010-05-26T20:59:38.374Z</fedora-view:lastModifiedDate>
<fedora-model:state>Active</fedora-model:state>
<nsdl:objectType>Aggregator</nsdl:objectType>
<nsdl:hasHandle>2200/20090730110108336T</nsdl:hasHandle>
</properties>
<data>
<serviceDescription ID="serviceDescription" LABEL=""
MIMETYPE="application/xml" canonical="true">http://ndr.nsdlib.org/api/get/2200/20090730110108336T/serviceDescription</serviceDescription>
<DC ID="DC" LABEL="Dublin Core Metadata" MIMETYPE="text/xml" canonical="true">http://ndr.nsdlib.org/api/get/2200/20090730110108336T/DC</DC>
</data>
<relationships>
<auth:authorizedToChange>2200/20091105132121677T</auth:authorizedToChange>
<nsdl:associatedWith>2200/20090901171719856T</nsdl:associatedWith>
<auth:authorizedToChange>2200/NCS</auth:authorizedToChange>
<nsdl:aggregatorFor>2200/NCS</nsdl:aggregatorFor>
<auth:authorizedToChange>2200/NSDL_Harvest_Ingest</auth:authorizedToChange>
<nsdl:memberOf>2200/NSDL_Collection_of_Collections_Aggregator</nsdl:memberOf>
</relationships>
</NDRObject>
</object>
</objectList>
</resultData>
</NSDLDataRepository>
The following is an example response when a datastreamName is specified.
<NSDLDataRepository schemaVersion="1.00.000"
xmlns="http://ns.nsdl.org/ndr/response_v1.00/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ns.nsdl.org/ndr/response_v1.00/ http://ns.nsdl.org/schemas/ndr/response_v1.00.xsd">
<responseTime>2010-10-11T20:36:07Z</responseTime>
<requestURL>/repository/api/getMultiple/DC</requestURL>
<resultData>
<datastreamList>
<datastream name="DC" handle="2200/20090325164605402T">
<oai_dc:dc
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Aggregator</dc:title>
<dc:identifier>hdl:2200%2F20090325164605402T</dc:identifier>
</oai_dc:dc>
</datastream>
<datastream name="DC" handle="2200/20090730110108336T">
<oai_dc:dc
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Aggregator</dc:title>
<dc:identifier>hdl:2200%2F20090730110108336T</dc:identifier>
</oai_dc:dc>
</datastream>
</datastreamList>
</resultData>
</NSDLDataRepository>

