Using the Geoportal REST API

The REST API in the Geoportal

The Geoportal REST API allows each metadata record in the geoportal catalog to be assigned a unique web-accessible URL. The geoportal's catalog can also be queried through URLs using REST syntax. Accessing individual metadata documents through their REST URLs, or groups of documents that match specific search criteria through a REST-formatted search URL, provides powerful functionality for searching, viewing, and sharing records. For example, you can send the URL to a metadata document or a search to colleagues, and they can access that resource without having to go to the geoportal and conduct their own search. Integrating the URLs into other webpages, or your organization's Content Management System, provides users with quick links to resources again without having to do their own search. Additionally, the REST API allows for easy integration with external applications, as described below.

To see the REST URL for an individual metadata record, click on the 'Details' link for the record in a list of search results, and scroll to the bottom of the Details page. The URL will be formatted similar to the following, with a unique GUID replacing the one shown here in italics.

 /geoportal/rest/document?f=html&id=%7BF6B6CCA6-9013-4018-9FFE-5F8163E27FBD%7D

To see the REST-formatted results for a specific search, scroll to the bottom of the geoportal's search results page after carrying out a search with your criteria of interest. You will see links to viewing the search in the GEORSS, ATOM, HTML, FRAGMENT, KML, or JSON REST format. Each REST format is described in the table below, with an example of how that format can be used in an external application.

REST Format

Description

External Application

GEORSS

View results in GEORSS format, also allowing users to subscribe to an RSS feed for records matching search criteria

RSS readers such as Microsoft® Outlook 2007, Microsoft® Internet Explorer and Mozilla Firefox

ATOM

View results in ATOM format, another standard for retrieving syndication feeds that also allows users to subscribe to updates

RSS readers such as Microsoft® Outlook 2007, Microsoft® Internet Explorer and Mozilla Firefox

HTML

Formats results as a full HTML document

Content Management Systems and Wikis such as Microsoft® SharePoint, Joomla!™ and JSPWiki

FRAGMENT

Formats results as a fragment of the HTML document, without the <html>,<head>,<title>, or <body> tags

Content Management Systems and Wikis such as Microsoft® SharePoint, Joomla!™ and JSPWiki

KML

Formats results in KML, allowing for display of search results in web mapping applications

Mapping applications such as Google™ Maps, Google™ Earth, Microsoft® Virtual Earth

JSON

Formats results in 'pretty' JSON

Custom applications, such as developing widgets for Microsoft® Silverlight

The REST API also allows users to search the Geoportal directly from their browser through OpenSearch capability. There are limitless possibilities with how your Geoportal catalog can be integrated into other applications, thereby granting your metadata catalog much prominence and exposure.


8/6/2012