Community:NDR/find

From NSDLWiki

Jump to: navigation, search

Contents

[hide]

find

finds handles for NDR objects (see ObjectTypes) that match given criteria.

Request URL

http://ndr.nsdl.org/api/find
Must be an HTTP POST request.

Arguments

  • inputXML (required) - contains criteria to select a set of NDR objects. Properties and/or Relationships may be used. While inputXML is required, no specific element is required for the find request -- only selection criteria should be included. The inputXML may lack or contain empty <properties>, <relationships> and/or <data> elements.
    • [objectType] - one of the NDR object types (see ObjectTypes): agent, aggregator, metadata, metadataProvider or resource. Note that first character is lowercase.
      • Properties - include any relevant properties to select a set of NDR objects.
      • Relationships - include any relevant relationships to select a set of NDR objects.

InputXML Example

Below is example inputXML for a find request. It will return the handles of all NDR metadata objects that have a uniqueID property of "oai:crs.nsdl.org:1523829", an itemId property of "oai:nsdl.org:crs:1523829", and a metadataFor relationship to the NDR object with handle "2200/20061002130909950T".
<?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">
  <metadata>
    <properties>
      <uniqueID>oai:crs.nsdl.org:1523829</uniqueID>
      <itemId>oai:nsdl.org:crs:1523829</itemId>
    </properties>
    <relationships>
      <metadataFor>2200/20061002130909950T</metadataFor>
    </relationships>
  </metadata>
</inputXML>


Response Fields

  • handle - the NDR handle(s) for NDR object(s) that match the selection criteria.

Response Example

<?xml version="1.0" encoding="UTF-8"?>
<NSDLRepository 
    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>2005-10-26T18:42:05Z</responseTime>
  <requestURL>http://ndr.nsdl.org/api/find</requestURL>
  <resultData>
    <handleList>
      <handle>2200/20060626134657904T</handle>
    </handleList>
  </resultData>
</NSDLRepository>

API Links:

Personal tools