TNS Internal:NDR/API/2.0/specification/modifyContent
From NSDLWiki
< TNS Internal:NDR | API | 2.0
| 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.x.
- Please provide feedback and comments in the NSDL Data Repository (NDR) API 2.0 Forum of the NSDL Community Forums.
NDR API Documentation - modifyContent
Replace content stored in the NDR with new uploaded content.
Request URL
- http://ndr.nsdlib.org/api/modifyContent
- Must be an HTTP POST request.
Arguments
Structure of input:
- handle (required) - the externally resolvable identifier for the Stored Content
- contentType (required) - mimetype of the binary content
- binaryContent (required) - binary content for uploading
InputXML Example
Below is example inputXML for finding collections in the NDR.
<?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">
<handle>2200/20061212656</handle>
<contentType>image/jpg</contentType>
<binaryContent>ÿØÿà ?JFIF ?? d d ÿì ?Ducky</binaryContent>
</inputXML>
Response
Structure of response:
- handle - the externally resolvable identifier for the Stored Content.
- handleURL - the permanent URL to an XML representation of the Stored Content in the NDR.
- resourceURL - the registered Resource URL providing access to the Stored Content.
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/modifyContent</requestURL>
<resultData>
<handle>2200/20061212656</handle>
<handleURL>http://ndr.nsdlib.org/api/getCollectionRecord/2200/20061212656</handleURL>
<resourceURL>http://ndr.nsdlib.org/api/getContent/2200/20061212656</resourceURL>
<resultData>
</NSDLDataRespository>
API Links:
- Conceptual Framework (2.0 philosophy)
- APIBasics
- ObjectTypes
- Encoding
- APIRequestsByObject v1.0
- APIRequestsAlphabetical v1.0
- APIRequestsByObject v2.0

