Bird Conservation Region (BCR) Code List and Search Web Service API

API

URL

description

status

notes

ws/ref/bcr/list

Return list of all BCRs

deployed

 

ws/ref/bcr/list?countryCode=<2-letter ISO country code>

Return list of BCRs found in the given country

not coded; need info about country and BCR intersections in DB before coding this


ws/ref/bcr/find?match=<string to match>

Return list of BCRs that match

deployed

What wildcards be used in the match string? No wildcards yet implemented.

ws/ref/bcr/list?subnational1Code=<subnational1 code>

Return list of BCRs found in the given "state"

not coded; need info about state and BCR intersections in DB before coding this

 

ws/ref/bcr/ping

Returns heartbeat response (see below)

not coded

The heartbeat (ping) request is simply a way to invoke the web service and make sure it is running and connected to its datasource. This ignores all parameters.

parameter

required

default

value options

description

status

match

yes, for /find

n/a

 

string to match against BCR names; What wildcards can be used?

deployed. No wildcards yet implemented.

locale

no

en_US

Java standard locale codes

locale in which to perform matching, and in which to provide names in response (when possible)

not coded

countryCode

no; if a countryCode and subnational1Code are specified for the same request, the countryCode is ignored

n/a


see AKN-1.0-Country

not coded

subnational1Code

no; if a countryCode and subnational1Code are specified for the same request, the countryCode is ignored

n/a


see AKN-1.0-Subnational1

not coded

format

no

csv

  • csv
  • xml

format to use for response

deployed.

Test URLS

Development URL

Deployed URL

Expected Response

Notes

http://localhost/ws/ref/bcr

http://ebird.org/ws1.0/ref/bcr

entire list in CSV format

Generates 404 error.

http://localhost/ws/ref/bcr/list

http://ebird.org/ws1.0/ref/bcr/list

entire list in CSV format

"csv" is the default format.

http://localhost/ws/ref/bcr/list?format=xml

http://ebird.org/ws1.0/ref/bcr/list?format=xml

entire list in XML format

 

http://localhost/ws/ref/bcr/list?format=csv

http://ebird.org/ws1.0/ref/bcr/list?format=csv

entire list in CSV format

 

http://localhost/ws/ref/bcr/list?format=QQQ

http://ebird.org/ws1.0/ref/bcr/list?format=QQQ

entire list in CSV format

Bad format value is ignored and defaulted to csv.

http://localhost/ws/ref/bcr/list?format=XML

http://ebird.org/ws1.0/ref/bcr/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/ref/bcr/find?match=mountain

http://ebird.org/ws1.0/ref/bcr/find?match=mountain

CSV list of 2 BCRs

 

http://localhost/ws/ref/bcr/find?match=mountain&format=xml

http://ebird.org/ws1.0/ref/bcr/find?match=mountain&format=xml

XML list of 2 BCRs

 

http://localhost/ws/ref/bcr/find?match=MOUNTAIN

http://ebird.org/ws1.0/ref/bcr/find?match=MOUNTAIN

CSV list of 2 BCRs

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

http://localhost/ws/ref/bcr/list?format=

http://ebird.org/ws1.0/ref/bcr/list?format=

entire list in CSV format

Bad format value is ignored and defaulted to csv.

http://localhost/ws/ref/bcr/find?match=

http://ebird.org/ws1.0/ref/bcr/find?match=

empty list in CSV format

 


Heartbeat (Ping) Response

Version 1.0
2008-02-21T12:37:32.546-05:00

CSV Result Format

<BCR code>, <name associated with BCR>
<BCR code>, <name associated with BCR>
<BCR code>, <name associated with BCR>

XML Result Format

<response>
  <header>
    <locale country="US" language="en"/>
    <timestamp>2008-02-21T12:37:32.546-05:00</timestamp>
    <criteria>
      <property name="match" value="something"/>
      <property name="subnational1Code" value="something"/>
      <property name="countryCode" value="something"/>
    </criteria>
    <comment>
    </comment>
  </header>
  <result>
    <location bcrCode="">name of the BCR region </location>
    <location bcrCode="">name of the BCR region </location>
    <location bcrCode="">name of the BCR region </location>
  </result>
</response>
  • No labels