TNS Internal:NDR/API/2.0/specification/modifyCollection
From NSDLWiki
< TNS Internal:NDR | API | 2.0(Redirected from Community:NDR/API/2.0/specification/modifyCollection)
| 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 - modifyCollection
Modify metadata about an existing collection for aggregating objects providing provenience that identifies the provider(s) of metadata and information stored as a part of this collection.
Request URL
- http://ndr.nsdlib.org/api/modifyCollection/[handle]
- where [handle] is defined in the Arguments section.
- Must be an HTTP POST request.
Arguments
Parameters on Request URL:
- handle (required) - the externally resolvable identifier of the collection (returned by addCollection).
Post Parameters for Request:
- inputXML (required)
- <collection> (required)
NOTE: Each element after <collection> has a command associated with it that identifies the action to be taken on that element. In general, the [command] can have the values add, delete, or modify. Certain elements restrict which commands are valid. See the notes for each element below.- parentCollection - the externally resolvable identifier (handle) for another Collection that serves as the parent of this collection. Valid [command]: add | delete | modify NOTE: The modify command will only succeed if there is only one parent.
- title - User friendly title of the collection. Valid [command]: modify
- description - Brief description of the purpose of the collection. Valid [command]: modify
- contact - Name of contact person for the collection. Valid [command]: add | delete | modify NOTE: The modify command will only succeed if there is only one contact.
- email attribute (optional) - Email of contact person for the collection
- resourceURL - URL to a resource that represents the collection as a whole. Valid [command]: delete | modify
- externalIdentifier - identifier that has meaning to the application that is responsible for the creation of the collection. Valid [command]: delete | modify
- <collection> (required)
Request URL Example
Below is an example of a request URL for modifyCollection.
http://ndr.nsdlib.org/api/modifyCollection/2200/20061212543
InputXML Example
The above URL must be posted along with an inputXML. Below is example inputXML for modifying the NDR_Collection record about a collection.
<?xml version="1.0" encoding="UTF-8"?>
<inputXML
xmlns="http://ns.nsdlib.org/ndr/request_v2.00/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ns.nsdlib.org/ndr/request_v2.00/ http://ns.nsdlib.org/schemas/ndr/request_v2.00.xsd"
schemaVersion="1.00.000">
<collection>
<add><parentCollection>2200/20061218943</parentCollection></add>
<modify><title>Middle School Portal</title></modify>
<delete><contact>Katy Ginger</contact></delete>
</collection>
</inputXML>
Response
Structure of response:
- handle - the externally resolvable identifier for the Collection.
- handleURL - the permanent URL to an XML representation of the Collection in the NDR.
Common Errors
- permissions do not allow modifying the specified 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/modifyCollection/[handle]</requestURL>
<resultData>
<handle>2200/20061212543</handle>
<handleURL>http://ndr.nsdl.org/api/getCollectionRecord/2200/20061212543</handleURL>
<resultData>
</NSDLDataRespository>
API Links:
- Conceptual Framework (2.0 philosophy)
- APIBasics
- ObjectTypes
- Encoding
- APIRequestsByObject v1.0
- APIRequestsAlphabetical v1.0
- APIRequestsByObject v2.0

