Blog

Updates, examples and tips from the inside.

Aeris API 1.0.2 Update

by lhuffman on Jan 05, 2012

Today we released version 1.0.2 of  the Aeris Weather API that provides some significant new capabilities, as well as several enhancements and bug fixes. The complete list of changes can be found in our version history, though some of the more significant enhancements include:

Sorting
Most APIs allow fetching of data, but leave sorting and filtering up to the developer to handle. With the Aeris API, we aim to simplify development by allowing the API to handle many of these features instead.

The new sort parameter allows making requests for data that is sorted by one or more elements from the data set. This feature allows fetching results presorted for easier processing and, when combined with the filter and query parameters, can obtain specific results that would normally not be readily available from a standard endpoint action. 

Review the complete sorting documentation for the full details and capabilities, but a few use cases where the new sort parameter would be useful include:

UC1 - Find the top 50 cities within the US based on population with the results sorted by descending population:
http://api.aerisapi.com/places/search?query=country:us&sort=pop:-1&limit=50

UC2 - Obtain the warmest location in Minnesota based on latest observations:
http://api.aerisapi.com/observations/search?query=state:mn&sort=temp:-1

UC3 - Find flood-related advisories in Minnesota and Wisconsin sorted by state, significance and expiration time descending:
http://api.aerisapi.com/advisories/search?query=state:mn,state:wi&filter=flood&sort=state,sigp,expires:-1&limit=200

UC4 - Find the 10 closest weather observations to Minneapolis and sort the results based on descending temperature:
http://api.aerisapi.com/observations/closest?p=minneapolis,mn&radius=50miles&limit=10&sort=temp:-1

API Versions
While we strive to test and to ensure backwards compatibility with each new release of the API, we understand there may be occasional needs to query a specific version of the API. We have now added the ability to query specific versions of the API, starting with version 1.0.1.

The standard query to obtain the latest observation for Minneapolis, MN using the latest version of the API would be:
http://api.aerisapi.com/observations/minneapolis,mn

The same request but using version 1.0.1 instead would be:
http://api.aerisapi.com/v1.0.1/observations/minneapolis,mn

If you provide an invalid version number, the latest stable version will always be used. While we offer this new capability, we recommend always using the latest stable release of the API within your custom applications.

posted in Aeris API, General, News

Submit a comment

Commenting is not available in this channel entry.

Comments

  • There are no comments for this entry.

Archive