TNS Internal:NDR/API/2.0/specification/listCollectionRecords
From NSDLWiki
< TNS Internal:NDR | API | 2.0(Redirected from Community:NDR/API/2.0/specification/listCollectionRecords)
| 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 in the NSDL Data Repository (NDR) API 2.0 Forum of the NSDL Community Forums.
NDR API Documentation - listCollectionRecords
List all collections including metadata and annotations about the collections.
Request URL
- http://ndr.nsdlib.org/api/listCollectionRecords?handle=[handle]&state=[state]
- where [handle] and [state] are defined in the Arguments section.
- May be an HTTP GET or POST request.
Arguments
Parameters on Request URL:
- [handle] (optional) - if collection handle is specified, the results will list the children collections of the collection represented by the handle
- [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/listCollectionRecords
Below is an example of a request URL for listing the child collections of collection with handle 2200/20100823473484T.
http://ndr.nsdlib.org/api/listCollectionRecords/2200/20100823473484T
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/listCollectionRecords?state=deleted
Response
Structure of response:
- ListCollectionRecords - one <record> for every collection in the NDR including metadata and annotations about each 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/listCollectionRecords?handle=[handle]&state=[state]</requestURL>
<resultData>
<record>
<parentCollection>2200/2010030201T</parentCollection>
<title>Beyond Penguins and Polar Bears</title>
<description>K-5 resource on arctic and antarctic</description>
<contacts>
<contact email="ginger@ucar.edu">Katy Ginger</contact>
</contacts>
<resourceURL>http://bppb.nsdl.org</resourceURL>
<externalIdentifier>NDR-000-000-000-0003</externalIdentifier>
<cataloguedBy/>
<annotatedBy/>
</record>
<record>
<parentCollection>2200/2010030201T</parentCollection>
<title>Middle School Portal (MSP2)</title>
<description>The MSP2 collection is ...</description>
<contacts>
<contact email="ginger@ucar.edu">Katy Ginger</contact>
</contacts>
<resourceURL>http://msteacher2.org</resourceURL>
<externalIdentifier>NDR-000-000-000-0001</externalIdentifier>
<cataloguedBy/>
<annotatedBy/>
</record>
<resultData>
</NSDLDataRespository>
API Links:
- Conceptual Framework (2.0 philosophy)
- APIBasics
- ObjectTypes
- Encoding
- APIRequestsByObject v1.0
- APIRequestsAlphabetical v1.0
- APIRequestsByObject v2.0

