TNS Internal:NDR/API/2.0/specification/listCollectionIdentifiers

From NSDLWiki

Jump to: navigation, search
 NDR Project Documentation   Conceptual Framework   v1.0 NDR-API Index   v2.0 NDR-API Index   Model 

Under Construction
Proposed method for inclusion in NDR/API 2.0.

Please provide feedback and comments using the Discussion tab on this page.


NDR API Documentation - listCollectionIdentifiers

List identifying information about all collections in the NDR.



Request URL

http://ndr.nsdlib.org/api/listCollectionIdentifiers?state=[state]
where [state] is defined in the Arguments section.
May be an HTTP GET or POST request.


Arguments

Parameters on Request URL:

  • [state] (optional) - determines whether active or deleted collections will be listed
    • state=active (default) - list only collections that are active
    • state=deleted - list only collections that have been marked as deleted


Request URL Example

Below is an example of a request URL for listing all active collections in the NDR.

http://ndr.nsdlib.org/api/listCollectionIdentifiers

Below is an example of a request URL for listing all deleted collections that have not been purged from the NDR.

http://ndr.nsdlib.org/api/listCollectionIdentifiers?state=deleted



Response

Structure of response:

  • ListCollectionIdentifiers - one <header> for every collection in the NDR including for each collection...
    • handle - the externally resolvable identifier of the collection (returned by addCollection)
    • handleURL - the permanent URL to an XML representation of the Collection in the NDR
    • collectionName - the user friendly name of the collection
    • agentName - the user friendly name of the owner agent for the collection
    • agentHandle - the handle (externally resolvable identifier) of the owner agent for the collection


Response Example

Below is an example response for this request.

<?xml version="1.0" encoding="UTF-8"?>
<NSDLDataRepository schemaVersion="1.00.000" 
    xmlns="http://ns.nsdlib.org/ndr/response_v2.00/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://ns.nsdlib.org/ndr/response_v2.00/ http://ns.nsdlib.org/schemas/ndr/response_v2.00.xsd">
  <responseTime>2006-04-10T18:07:53Z</responseTime>
  <requestURL>http://ndr.nsdlib.org/api/listCollectionIdentifiers</requestURL>
  <resultData>
    <ListCollectionIdentifiers>
      <header>
        <handle>2200/20061212656</handle>
        <handleURL>http://ndr.nsdl.org/api/getCollectionRecord/2200/20061212656</handleURL>
        <collectionName>Test Collection</collectionName>
        <agentName>NCS</agentName>
        <agentHandle>2200/20060410173455215T</agentHandle>
      </header>
      <header>
        <handle>2200/20061212543</handle>
        <handleURL>http://ndr.nsdl.org/api/getCollectionRecord/2200/20061212543</handleURL>
        <collectionName>Test Collection 2</collectionName>
        <agentName>NCS</agentName>
        <agentHandle>2200/20060410173455215T</agentHandle>
      </header>
      <header>
        <handle>2200/20061246432</handle>
        <handleURL>http://ndr.nsdl.org/api/getCollectionRecord/2200/20061246432</handleURL>
        <collectionName>Test Collection 3</collectionName>
        <agentName>NCS</agentName>
        <agentHandle>2200/20060410173455215T</agentHandle>
      </header>
    </ListCollectionIdentifiers>
  </resultData>
</NSDLDataRepository>




API Links:


Additional Links Related to This Call:

Personal tools