Close

Service Interruption

The NSIDC Web site and data services are currently having intermittent problems and may be unavailable. We are working to restore these services as soon as possible and apologize for any inconvenience this may cause. Please contact NSIDC User Services for assistance.

Libre

Advertise, Share, and Discover Data

Libre is supported by NASA Libre is supported by NSF Libre is supported by The Polar Information Commons

Support for Libre is provided by NASA, NSF, and the Polar Information Commons.

Creative Commons License
Rights to all Libre content, web applications, and APIs, are freely available under the Creative Commons By Attribution License.

Polar Information Commons Rights and Badging API

Overview

In addition to supporting Web applications that allow users to interactively create a Polar Information Commons (PIC) badge, nsidc.org hosts a suite of Web services that allow programmers to generate and embed a PIC badge from within their own programs. This is useful, for example, if you need to badge a large number of data sets.

To help you create the badges, you can use any of the following three Application Programming Interfaces (APIs):

  1. An API that defines the kinds of badges supported by the PIC
  2. An API that defines the fields needed for a particular kind of badge
  3. An API that generates a badge in a user-specified format based on the information the user provides
  4. Additional code samples

Field Descriptions

Table 1 and Table 2 contain the descriptions of the fields used in the pic_cc_zero waiver and the pic_cc_by licence. For additional information on these and other fields, please go to the Creative Commons API documentation Web site.

NOTE:This API accepts parameters passed by URL or POST, depending on the usage. This API does not actually accept XML input.

Table 1. PIC-CC-Zero Field Descriptions
Field Description Value
title The title of the data you are badging string
attribution_URL The URL of your data string
This field is required.
territory The country of the contributor Must be a valid, uppercase ISO 3166-1-alpha-2 country code. A list of available country codes is available at the ISO Web site.
This field is required.
creator
The name of the creator of the data, that is, the name of a person or organization string
This field is required.
outputType XML or HTML
The HTML version can be placed on your Web page to display the badge for the data set.
The XML version can be placed within the Use Constraints field of the metadata for your data set.
This field is required.
Table 2. PIC-CC-By License Field Descriptions
Field Description Value
title The title of the data you are badging string
workurl The URL for your data string
This field is required.
type The type of data Text, StillImage, MovingImage, InteractiveResource, Sound, Dataset
This field is required.
description A brief paragraph describing your data string
creator
The name of the creator of the data, that is, the name of a person or organization string

 

holder The name of the person or organization currently responsible for the archival of your data set string
outputType XML or HTML
The HTML version can be placed on your Web page to display the badge for the data set.
The XML version can be placed within the Use Constraints field of the metadata for your data set.
This field is required.
year The year you generated your data set formatted as YYYY

1. An API that Defines the Kinds of Badges Supported by the PIC [top]

This API helps you find the names and IDs of the licences currently offered by the PIC.

Calling Structure and Method

To call this API, go to the following API URI:

http://nsidc.org/api/picbadge/licenses/

Once the Web page loads, right click and select View Source. The Web page displays the XML output.

Return Structure

As of July 2010, this API returns the following XML:

<licenses>

<license id="pic_cc_zero">PIC CC Zero Waiver</license>

<license id="pic_cc_by">PIC CC By License</license>

</licenses>

2. An API that Defines the Fields Needed for a Particular Kind of Badge [top]

This API defines the specific fields for the badges currently offered by the PIC.

Calling Structure and Method

To call this API, use the following URI and replace <licenseID> with one of the following valid badge types: pic_cc_zero or pic_cc_by.

http://www.nsidc.org/api/picbadge/licenses/<licenseID>

This is an example of how to call the API for a pic_cc_zero badge:

http://nsidc.org/api/picbadge/licenses/pic_cc_zero/

This is an example of how to call the API for a pic_cc_by badge:

http://nsidc.org/api/picbadge/licenses/pic_cc_by/

Once the Web page loads, right click and select View Source. The Web page displays the XML output.

Return Structure

If you entered pic_cc_zero, the API returns code similar to the sample code below.

<licenseClass id="pic_cc_zero">

<field id="title">

<label>Title of work</label>

<description>The title of your data set</description>

</field>

<field id="attribution_url">

<label>Your URL</label>

<description>The URL of your data set</description>

</field>

<field id="territory">

<label> Territory </label>

<description>The country code</description>

</field> <field id="creator">

<label>Publisher</label>

<description>Your name (if you are the creator of your data set)</description>

</field> <field id="outputType">

<label>Waiver's output format</label>

<description>XML or HTML. The HTML version can be placed on your Web page to display the badge for the data set. The XML version can be placed within the Use Constraints field of the metadata for your data set.</description>

<type>enum</type>

<enum id="html">

<label>HTML</label>

</enum>

<enum id="xml">

<label>XML having HTML and RDF</label>

</enum>

</field>

</licenseClass>

If you entered the pic_cc_by string, the API returns code similar to the sample code below.

<licenseClass id="pic_cc_by">

<field id="title">

<label>Title of work</label>

<description>The title of your data set</description>

</field>

<field id="workurl">

<label>Attribute work to URL</label>

<description>The URL for your data set</description>

</field>

<field id="sourceurl">

<label>Source work URL</label>

<description>The URL of a precursor data set you used to create your data set</description>

</field>

<field id="type">

<label>Format of Work</label>

<description>The type of work</description>

</field> <field id="year">

<label>Year</label>

<description>The year you generated your data set</description>

</field>

<field id="description">

<label>Description</label>

<description>A brief paragraph describing your data set</description>

</field>

<field id="creator">

<label>Attribute work to name</label>

<description>Your name (if you are the creator of your data set)</description>

</field>

<field id="holder">

<label>Holder</label>

<description>The name of the person or organization currently responsible for the archival of your data set</description>

</field>

<field id="outputType">

<label>License's output format</label>

<description>XML or HTML. The HTML version can be placed on your Web page to display the badge for the data set. The XML version can be placed within the Use Constraints field of the metadata for your data set.</description>

<type>enum</type>

<enum id="html">

<label>HTML</label>

</enum> <enum id="xml">

<label>XML having HTML and RDF</label>

</enum>

</field>

</licenseClass>

3. An API that Generates a Badge in a User-specified Format Based on the Information the User Provides [top]

This API generates and returns a badge in HTML or XML format, based on the information you provide.

Calling Structure and Method

To call this API, go to the following URI and replace <licenseID> with one of the following valid badge types: pic_cc_zero or pic_cc_by.

http://www.nsidc.org/api/picbadge/licenses/<licenseID>/issue

The outputType field is required and at least one input field is expected. Only the POST method is allowed.

The following sample code shows the fields that are used as input for a pic_cc_zero badge:

<answers>

<work-info>

<title>IceBridge Snow Radar L1B Geolocated Radar Echo Strength Profiles</title>

<attribution_url>http://nsidc.org/data/irsno1b.html</attribution_url>

<territory>US</territory>

<creator>Carl Leuschen</creator>

</work-info>

<outputType>HTML</outputType>

</answers>

The following sample code shows the fields that are used as input for a pic_cc_by badge:

<answers>

<work-info>

<title>MODIS/Aqua Snow Cover 8-Day L3 Global 500m Grid, Version 5</title>

<workurl>http://nsidc.org/data/myd10a2v5.html</workurl>

<sourceurl>http://nsidc.org/data/myd10a1v5.html</sourceurl>

<type>Data Set</type>

<description>The MODIS/Aqua Snow Cover 8-Day L3 Global 500m Grid (MYD10A2) data set contains data fields for maximum snow cover extent over an eight-day compositing period and a chronology of snow occurrence observations in compressed Hierarchical Data Format-Earth Observing System (HDF-EOS) format, along with corresponding metadata.</description>

<creator>G. Riggs, D. Hall, V. Salomonson</creator>

<holder>NSIDC</holder>

</work-info>

<outputType>HTML</outputType>

</answers>

Return Structure

If the licenseID is pic_cc_zero and the outputType is HTML, the API returns the following code:

<html>

<p xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">

<a href="http://polarcommons.org/ethics-and-norms-of-data-sharing.php"><img src="http://polarcommons.org/images/PIC_print_small.png"/> </a>

<a rel="license" href="http://creativecommons.org/publicdomain/zero/1.0/"> <img src="http://i.creativecommons.org/l/zero/1.0/88x31.png" style="border-style: none;" alt="CC0"/> </a> <br/> To the extent possible under law, <a rel="dct:publisher" href="http://nsidc.org/data/myd10a2v5.htmlL"><span property="dct:title">Carl Leuschen</span></a> has waived all copyright and related or neighboring rights to<span property="dct:title">IceBridge Snow Radar L1B Geolocated Radar Echo Strength Profiles</span>.

</p>

</html>

If the licenseID is pic_cc_zero and the outputType is XML, the API returns the following code:

<result>

<license-uri>http://creativecommons.org/publicdomain/zero/1. 0/</license-uri>

<license-name>CC0 1.0 Universal</license-name>

<rdf>

<rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns: rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<Work xmlns:dc="http://purl.org/dc/elements/1.1/" rdf: about="">

<dc:title>MODIS/Aqua Snow Cover 8-Day L3 Global 500m Grid, Version 5</dc:title>

<dc:creator>G. Riggs, D. Hall, V. Salomonson</dc:creator>

<license rdf:resource="http: //creativecommons.org/publicdomain/zero/1.0/"/>

</Work>

<License rdf:about="http://creativecommons. org/publicdomain/zero/1.0/">

<permits rdf:resource="http://creativecommons. org/ns#DerivativeWorks"/>

<permits rdf:resource="http://creativecommons. org/ns#Distribution"/>

<permits rdf:resource="http://creativecommons. org/ns#Reproduction"/>

</License>

</rdf:RDF>

</rdf>

 

<licenserdf>

<rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns: rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<License rdf:about="http://creativecommons. org/publicdomain/zero/1.0/">

<permits rdf:resource="http://creativecommons. org/ns#DerivativeWorks"/>

<permits rdf:resource="http://creativecommons. org/ns#Distribution"/>

<permits rdf:resource="http://creativecommons. org/ns#Reproduction"/>

</License>

</rdf:RDF>

</licenserdf>

<html>

<p xmlns:dct="http://purl.org/dc/terms/">

<a href="http://polarcommons.org/ethics-and-norms-of-data- sharing.php"><img src="http://polarcommons. org/images/PIC_print_small.png"/></a><a rel="license" href="http://creativecommons.org/publicdomain/zero/1.0/"> <img src="http://i.creativecommons.org/l/zero/1.0/88x31.png" style="border-style: none;" alt="CC0"/> </a>

<br/>

To the extent possible under law, <a rel="dct:publisher" href="http://nsidc.org/data/myd10a2v5.html"> <span property="dct:title">G. Riggs, D. Hall, V. Salomonson</span></a> has waived all copyright and related or neighboring rights to <span property="dct:title">MODIS/Aqua Snow Cover 8-Day L3 Global 500m Grid, Version 5</span>.

</p>

</html>

</result>

If the licenseID is pic_cc_by and the outputType is HTML, the API returns code similar to the sample code below.

<html>

<a href="http://polarcommons.org/ethics-and-norms-of-data-sharing.php"><img src="http://polarcommons.org/images/PIC_print_small.png"/></a>

<a href="http://creativecommons.org/licenses/by/3.0/" rel="license"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by/3.0/88x31.png" style="border-width:0"/></a><br/>

This <span href="http://purl.org/dc/dcmitype/Text" rel="dc:type" xmlns:dc="http://purl.org/dc/elements/1.1/">work</span> by <a href="http://nsidc.org/data/myd10a2v5.html" property="cc:attributionName" rel="cc:attributionURL" xmlns:cc="http://creativecommons.org/ns#">G. Riggs, D. Hall, V. Salomonson</a> is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 Unported License</a>

</html>

If the licenseID is pic_cc_by and the outputType is XML , the API returns code similar to the sample code below.

<result>

<license-uri>http://creativecommons.org/licenses/by/3.0/< /license-uri>

<license-name>Attribution 3.0 Unported</license-name>

<rdf>

<rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns: rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<Work xmlns:dc="http://purl.org/dc/elements/1.1/" rdf: about=" Attribution URL">

<dc:title>MODIS/Aqua Snow Cover 8-Day L3 Global 500m Grid, Version 5</dc:title>

<dc:type>http://purl.org/dc/dcmitype/Text</dc:type>

<dc:date>2010</dc:date>

<dc:description>The MODIS/Aqua Snow Cover 8-Day L3 Global 500m Grid (MYD10A2) data set contains data fields for maximum snow cover extent over an eight-day compositing period and a chronology of snow occurrence observations in compressed Hierarchical Data Format-Earth Observing System (HDF-EOS) format, along with corresponding metadata.</dc:description>

<dc:creator>G. Riggs, D. Hall, V. Salomonson</dc:creator>

<dc:rights>G. Riggs, D. Hall, V. Salomonson</dc:rights>

<dc:source>http://nsidc.org/data/myd10a2v5.html</dc:source>

<license rdf:resource="http://creativecommons. org/licenses/by/3.0/"/>

</Work>

<License rdf:about="http: //creativecommons.org/licenses/by/3.0/">

<permits rdf:resource="http://creativecommons. org/ns#DerivativeWorks"/>

<permits rdf:resource="http://creativecommons. org/ns#Distribution"/>

<permits rdf:resource="http://creativecommons. org/ns#Reproduction"/>

<requires rdf:resource="http://creativecommons. org/ns#Attribution"/>

<requires rdf:resource="http://creativecommons. org/ns#Notice"/>

</License>

</rdf:RDF>

</rdf>

<licenserdf>

<rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns: rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<License rdf:about="http://creativecommons.org/licenses/by/3. 0/">

<permits rdf:resource="http://creativecommons. org/ns#DerivativeWorks"/>

<permits rdf:resource="http://creativecommons. org/ns#Distribution"/>

<permits rdf:resource="http://creativecommons. org/ns#Reproduction"/>

<requires rdf:resource="http://creativecommons. org/ns#Attribution"/>

<requires rdf:resource="http://creativecommons. org/ns#Notice"/>

</License>

</rdf:RDF>

</licenserdf>

<html>

<a href="http://polarcommons.org/ethics-and-norms-of- data-sharing.php"><img src="http://polarcommons. org/images/PIC_print_small.png"/></a>

<a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png"/></a>< br/>This <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" rel="dc:type">work< /span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://nsidc.org/data/myd10a2v5.html" property="cc:attributionName" rel="cc:attributionURL">G. Riggs, D. Hall, V. Salomonso</a> is licensed under a <a rel="license" href="http: //creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.

<br/>

Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://nsidc.org/data/myd10a2v5.html" rel="dc:source">http://nsidc.org/data/myd10a2v5.html</a>.

</html>

</result>

4. Additional Code Samples[top]

Example Python code for creating a badge:

myPICLicense = urllib2.urlopen(APIURL, data="answers = %s" % MyXMLAnswers).read()

NOTE:The MyXMLAnswers parameter is the same as the input parameters mentioned in this API.


Page last updated: 11/14/12