Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Panel
Table of Contents

Species List and Search Web Service API

API

This API provides a way to find out what species for which we hold data.

URL

description

status

notes

ws/data/species/list

Return entire list of species names

deployed

 

ws/data/species/find?match=<string to match>

Return species that match query string

deployed

No wildcard yet implemented in the matching string.

parameter

required

default

value options

description

dataService

-proposed-

-proposed-

-proposed-

-proposed-

collection

no

n/a

see AKN-1.0-Collections

limits search for the species name to a certain collection

match

yes, for /find

n/a

 

string to use in matching against sci. name (and common name?); are wildcard allowed in the match string?

locale

no

en_US

Java standard locale codes

locale in which to provide names in response and in which to match query string (when possible)

format

no

csv

  • csv
  • xml

format to use for response

Test URLS

Development URL

Deployed URL

Expected Response

Notes

http://localhost/ws/data/species

http://ebird.org/ws1.0/data/species

entire list in CSV format

Generates 404 error. 

http://localhost/ws/data/species/list

http://ebird.org/ws1.0/data/species/list

entire list in CSV format

"csv" is the default format.

http://localhost/ws/data/species/list?format=xml

http://ebird.org/ws1.0/data/species/list?format=xml

entire list in XML format

 

http://localhost/ws/data/species/list?format=csv

http://ebird.org/ws1.0/data/species/list?format=csv

entire list in CSV format

 

http://localhost/ws/data/species/list?format=QQQ

http://ebird.org/ws1.0/data/species/list?format=QQQ

entire list in CSV format

Bad format value is ignored and defaulted to csv.

http://localhost/ws/data/species/list?format=XML

http://ebird.org/ws1.0/data/species/list?format=XML

entire list in CSV format

"XML" is not a valid format option. Only "xml" and "csv" are valid options.

http://localhost/ws/data/species/find?match=streptopelia

http://ebird.org/ws1.0/data/species/find?match=streptopelia

CSV list of species

 

http://localhost/ws/data/species/find?match=streptopelia&format=xml

http://ebird.org/ws1.0/data/species/find?match=streptopelia&format=xml

XML list of species

 

http://localhost/ws/data/species/find?match=STREPTOPELIA

http://ebird.org/ws1.0/data/species/find?match=STREPTOPELIA

CSV list of species

There should be no difference in response for upper/lower case search strings.

http://localhost/ws/data/species/list?format=

http://ebird.org/ws1.0/data/species/list?format=

entire list in CSV format

Bad format value is ignored and defaulted to csv.

http://localhost/ws/data/species/find?match=

http://ebird.org/ws1.0/data/species/find?match=

empty list in CSV format

 

CSV Result Format

Panel

<sci. name>, <common name>
<sci. name>, <common name>
<sci. name>, <common name>

XML Result Format

No Format
<response>
  <header>
    <locale country="US" language="en"/>
    <timestamp>2008-02-21T12:37:32.546-05:00</timestamp>
    <criteria>
      <property name="match" value="kldsfsd"/>
      <property name="dataService" value="dskfjsdklfj" />
      <property name="collection" value="dsafsfsdkljfslkfj"/>
    </criteria>
    <comment>
    </comment>
  </header>
  <result>
     <species>      <scientific-name>XXXXX</scientific-name>      <common-name>YYYYY</common-name>    </species>
     <species>      <scientific-name>XXXXX</scientific-name>      <common-name>YYYYY</common-name>    </species>
     <species>      <scientific-name>XXXXX</scientific-name>      <common-name>YYYYY</common-name>    </species>

  </result>
</response