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

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.x.

Please provide feedback and comments in the NSDL Data Repository (NDR) API 2.0 Forum of the NSDL Community Forums.


NDR API Documentation - getAnnotation

Get an annotation of another object.



Request URL

http://ndr.nsdlib.org/api/getAnnotation/[handle]?XMLFormat=[XMLFormat]
where [handle] and [XMLFormat] are defined in the Arguments section.
May be an HTTP GET or POST request.


Arguments

Parameters on Request URL:

  • handle (required) - the externally resolvable identifier of the annotation (returned by addAnnotation).
  • XMLFormat (optional) - id of the format in which the annotation will be returned transforming if necessary (defaults to native format passed in during addAnnotation) NOTE: requires registration of transform in advance



Request URL Example

Below is example inputXML for getting an annotation.

http://ndr.nsdlib.org/api/getAnnotation/2200/20061212543?XMLFormat=nsdl_anno




Response

Structure of response:

  • annotation record
    • header
      • handle - the externally resolvable identifier for the annotation.
      • handleURL - the permanent URL to an XML representation of the annotation in the NDR.
      • externalIdentifier - application specific identifier that can be stored to facilitate retrieval by applications
      • XMLFormat - id of the format of the returned annotation
      • annotatesHandle - the externally resolvable identifier for the object being annotated.
      • annotatesHandleURL- the permanent URL to an XML representation in the NDR of the object being annotated.
      • collectionName - name of the collection that holds this annotation
      • collectionHandle - the externally resolvable identifier for the Collection
      • agentName - name of the agent application responsible for the Collection that holds this annotation
      • agentHandle - the externally resolvable identifier for the Agent
    • annotationXML - the annotation in the requested format


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/getAnnotation/[handle]?XMLFormat=[XMLFormat]</requestURL>
  
  <resultData>
    <record>
      <header>
        <handle>2200/20061212656</handle>
        <handleURL>http://ndr.nsdlib.org/api/getAnnotation/2200/20061212656</handleURL>
        <externalIdentifier source="NCS">CLC-000-000-000-054</externalIdentifier>
        <XMLFormat>nsdl_anno</XMLFormat>
        <annotatesHandle>2200/2006334290</annotatesHandle>
        <annotatesHandleURL>http://ndr.nsdlib.org/api/getMetadataRecord/2200/2006334290</annotatesHandleURL>
        <collectionName>Concepts Library Collaborative</collectionName>
        <collectionHandle>2200/20061258473</collectionHandle>
        <agentName>NCS</agentName>
        <agentHandle>2200/20061857483</agentHandle>
      </header>
      <annotationXML>
        <nsdl_anno:nsdl_anno 
            xmlns:nsdl_anno="http://ns.nsdl.org/nsdl_anno_v1.02/" 
            schemaVersion="1.02.000" xmlns:dc="http://purl.org/dc/elements/1.1/" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="http://ns.nsdl.org/nsdl_anno_v1.02/ http://ns.nsdl.org/schemas/nsdl_anno/nsdl_anno_v1.02.xsd"> 
          <title>Annotations for Global Sun Temperature Project</title> 
          <rating>5</rating> 
        </nsdl_anno:nsdl_anno>   
      </annotationXML>
    </record>
  <resultData>
</NSDLDataRespository>



API Links:


Additional Links Related to This Call:

Personal tools