DEOS : Web Services and Data Feeds

DEOS Technical Note #17

Dr. Geoffrey E. Quelch

Research Fellow,
University of Delaware,
Center for Climatic Research


   University of Delaware
   NewarkDE 19716
   
  

Version 2

All material herein is copyright by The Delaware Environmental Observing System

Published: October 6th 2006

Revision History
Revision 2.12006/10/06GEQ
Initial version
Revision 2.22006/10/12GEQ
Added first cut at web service method descriptions.
Revision 2.32006/10/26GEQ
Removed explicit discussion of SOAP interface, revised options descriptions.
Revision 2.42006/12/08GEQ
Added getDataTypeList method.
Revision 2.52007/2/14GEQ
Updated document with span zero handling for data requests.

Table of Contents

Introduction
Web Services
REST Web Services
Web Services Software Interface
Retrieving A Network List
Retrieving A Station List
Retrieving A Data Type List
Retrieving Station Data
Error Handling
Configuration
Syndication Feeds; Atom and RSS
Atom Feeds
RSS Feeds
Geographical Encoding
Syndication Subscription Files

Introduction

This document summarizes the available data feeds for the DEOS system. Feeds are divided into syndication feeds of daily and completed monthly data pages, and web service feeds.

Web Services

The following sections describe the DEOS web service feeds.

REST Web Services

Web Services Software Interface

The external interface to the web services are described in this section.

Retrieving A Network List

The following section describes the method implemented to retrieve the list of networks providing web service data.

Purpose

To provide a list of networks providing data for the DEOS web services. The network names returned by this method are needed in subsequent calls to retrieve station IDs and station data.

Options

The following are the options understood by this component.

Required Parameters

The following item is required.

  • key; a valid access key.

Example Output

The following is an example request and a example output.

Example 1. Example Request


[URL]ws/REST/V1/getNetworkList?key=abcdef

Retrieving A Station List

The following section describes the method implemented to retrieve a list of stations from a given network or state, or county within a state.

Purpose

To provide a list of stations in a given subset providing data for the DEOS web services. The station IDs returned by this method are needed in subsequent calls to retrieve the station data itself.

Options

The following are the options understood by this component.

Required Parameters

The following items are required.

  • key; a valid access key.

  • network; the network name as returned from a call to getNetworkList.

  • state; the two-letter state abbreviation.

  • county; the county name in the given state.

Example Output

The following is an example request and a example output.

Example 3. Example Request


[URL]ws/REST/V1/getStationList?key=abcdef&state=PA

Retrieving A Data Type List

The following section describes the method implemented to retrieve the list of data types available.

Purpose

To provide a list of data types providing data for the DEOS web services. The abbreviations returned by this method are needed in subsequent calls to retrieve station data if the user wishes to educe the volume of returned data.

Options

The following are the options understood by this component.

Required Parameters

The following item is required.

  • key; a valid access key.

Optional Parameter

The following items are optional.

  • units; unit schema (default is SI).

Example Output

The following is an example request and a example output.

Example 5. Example Request


[URL]ws/REST/V1/getDataTypeList?key=abcdef

Retrieving Station Data

The following section describes the method implemented to retrieve the meteorological data of a given station via the web service.

Purpose

To provide a set of station meteorological and other data for the DEOS web services.

Options

The following are the options understood by this component.

Required Parameters

The following items are required.

  • key; a valid access key.

  • station; the station name.

  • network; the network name.

Optional Parameters

The following items are optional.

  • dataTypes; the list if data type abbreviations to use. The default is to retrieve data for all data types.

  • time; the date and time for the data retrieval. The default is the current date and time. [1]

  • span; the time span (in minutes) for the data retrieval. The default is one hour. Spans over 24 hours are not permitted. If a span of zero is requested, then any time parameter is ignored and the most recent data for all relevant data types are returned. N.B. The date of this data may not be recent, so the user needs to check on the data currency.

  • units; either SI (default) or English

  • tz; the time zone that the data will be generated for. The default is UTC (GMT). [2]

Example Output

The following is an example request and a example output.

Example 7. Example Request


[URL]ws/REST/V1/getStationData?key=abcdef&station=DPTR&network=DEOS&tz=EST5EDT&span=5&time=2006/10/25 17:00:00

Error Handling

The following section describes the output in the case of a processing error.

Example Output

The following is an example request and a error example output.

Example 9. Example Request


[URL]ws/REST/V1/getNetworkList?key=badkey

Configuration

The following list of parameters are the configurable items for the web services component and can be found in the ofnidb.jnk file in the odd-divas directory.

  • gDEBUG: this is the setting that allows more output to be generated, assisting fixing problems.

  • gRECORDMAX: this is the maximum number of data items that can be retrieved. Care must be exercised when setting this too large values. Other limits from PHP, both memory and execution time may occur.

Syndication Feeds; Atom and RSS

The following sections describe the DEOS syndicated data feeds.

Atom Feeds

The DEOS Atom feeds are based on Atom Version 1.0.

RSS Feeds

The DEOS RSS (Real Simple Syndication) feeds are based on RSS Version 2.0.

Geographical Encoding

Both the Atom and RSS feeds utilize GeoRSS encodings to specify the geographical location of the station providing the data.

Syndication Subscription Files

It is expected that the web developer of the site hosting the data feeds will provide a summary page of all the feeds to allow subscribers easy access to all the available feeds. This section summarizes where the data feed files originate for the benefit of the web developer.

The daily feeds files are accessible as described in the following example:

Example 11. Daily Feed Access


[DF_BASE_URI]/[feed type]/[network]/[station]/daily.xml

The completed monthly data feeds are accessible as described in the following example:

Example 12. Monthly Feed Access


[DF_BASE_URI]/[feed type]/[network]/[station]/monthly-[unit type].xml

The options are as follows:

  • DF_BASE_URI: is set in the DCF and must match the DF_BASE_DIR setting, relative to the web site root.

  • feed type: Either Atom or rss.

  • network: the name of the network.

  • station: the name of the station.

  • unit type: either SI or english.



[1] The date and time string must meet the guidelines presented here.

[2] The time zone string must be from the list provided here.