Using the API


All of the data used in this project is available through the following urls.

The data is provided in the JSON format, and optionally follows the JSONP pattern with the HTTP GET parameter jsonp or callback.

  • /varietyselectiontool/data/trial_entry/id_(?P[0-9]+)/json/
    • Returns the varietal trial entry for the given id number.
    • example: id=1
    • example: id=1, callback=processThis
    • note: all other API calls support jsonp and callback, but examples for the remainder will be excluded for brevity.
  • /varietyselectiontool/data/trial_entry/near_zipcode_(?P[0-9]+)/last_3_years/json/
    • Returns the varietal trial entries with locations near the given zipcode with dates within the last 3 years.
    • example: zipcode=58102
  • /varietyselectiontool/data/trial_entry/near_zipcode_(?P[0-9]+)/last_3_years/ids/json/
    • Returns only the ids for varietal trial entries with locations near the given zipcode with dates within the last 3 years.
    • example: zipcode=58102
  • /varietyselectiontool/data/zipcode/id_(?P[0-9]+)/json/
  • /varietyselectiontool/data/zipcode/partial_zipcode_(?P[0-9]+)/json/
    • Returns the zipcode metadatas for a zipcodes starting with the given digits.
    • example: zipcode=581
  • /varietyselectiontool/data/location/id_(?P[0-9]+)/json/
    • Returns the location entry for the given id number.
    • example: id=2
  • /varietyselectiontool/data/location/all/json/
    • Returns all location entries.
    • example: all
  • /varietyselectiontool/data/location/near_zipcode_(?P[0-9]+)/json/
    • Returns the location entries near the given zipcode, sorted by distance.
    • example: zipcode=58102
  • /varietyselectiontool/data/variety/id_(?P[0-9]+)/json/
    • Returns the variety entry for the given id number.
    • example: id=2
  • /varietyselectiontool/data/variety/all/json/
    • Returns all variety entries.
    • example: all