TNS Internal:NDR/API/2.0/specification/getResourceURL
From NSDLWiki
< TNS Internal:NDR | API | 2.0(Redirected from Community:NDR/API/2.0/specification/getResourceURL)
												
			
| 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 - getResourceURL
Get the registered URL for a resource in the NDR.
Request URL
- http://ndr.nsdlib.org/api/getResourceURL/[handle]
 
- where [handle] is defined in the Arguments section.
 
- May be an HTTP GET or POST request.
 
Arguments
Parameters on Request URL:
- [handle] (optional) - the externally resolvable identifier of the resource or a metadata record for the resource
 
Request URL Example
Below is an example of a request URL for getting the web URL of a registered resource.
http://ndr.nsdlib.org/api/getResourceURL/2200/20061212543</nowiki>
Response
Structure of response:
- resourceURL - registered URL for the Resource
 - handle - the externally resolvable identifier for the Resource.
 - handleURL - the permanent URL to an XML representation of the resource in the NDR.
 - contentType - mimetype of internally stored content NOTE: Not specified for external 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/getResourceURL/[handle]</requestURL>
  
  <resultData>
    <resourceURL>http://stuffonmycat.com/</resourceURL>
    <handle>2200/20061212656</handle>
    <handleURL>http://ndr.nsdlib.org/api/getResourceMetadata/2200/20061212656</handleURL>
  <resultData>
</NSDLDataRespository>
API Links:
- Conceptual Framework (2.0 philosophy)
 - APIBasics
 - ObjectTypes
 - Encoding
 - APIRequestsByObject v1.0
 - APIRequestsAlphabetical v1.0
 - APIRequestsByObject v2.0
 

