Panel | |
---|---|
|
CountryCode List and Search Web Service API
API
URL | description | status | notes |
---|---|---|---|
ws/ref/country/list | Return entire list of country names and codes | coded, not deployed |
|
ws/ref/country/find?match=<string to match> | Return list of country names and their codes that match | coded, not deployed | What wildcards be used in the match string? No wildcard yet implemented. |
parameter | required | default | value options | description | status |
---|---|---|---|---|---|
match | yes, for /find | n/a |
| String to match against "country" names. What kind of wildcards can be used? | coded, not deployed. No wildcard 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 |
format | no | csv |
| format to use for response | deployed not coded |
Test URLS
Development URL | Deployed URL | Expected Response | Notes | ||||||
---|---|---|---|---|---|---|---|---|---|
entire list in CSV format | Generates 404 | ||||||||
|
| What do we want here? 404? Redirect to /ws/ref/country/list? | http://localhost/wsebird.org/ws1.0/ref/country/list | entire list in CSV format | "csv" is the default format. | ||||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c1311d4b-1c71-45d5-8436-b80e10074aa4"><ac:plain-text-body><![CDATA[ | [http://localhost/ws/ref/][][country][/list?format=xml] | entire list in XML format |
| ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="dc58991b-4fe3-4aaf-830f-f005adfe2319"><ac:plain-text-body><![CDATA[ | ||||
http://ebird.org/ws1.0/ref/country [http://localhost/ws/ref/][][country][/list?format=csv] | entire list in CSV format |
| |||||||
]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1be84114-8156-42aa-a214-d36fb3587001"><ac:plain-text-body><![CDATA[ | [http://localhost/ws/ref/][][country][/list?format=QQQ] |
| entire list in CSV format | Bad format value is ignored and defaulted to csv. | ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="47257bb5-3a1c-4c8d-a46d-1aca5317a5c9"><ac:plain-text-body><![CDATA[ | ||
http://ebird.org/ws1.0/ref/country [http://localhost/ws/ref/][][country][/list?format=XML] | entire list in CSV format | "XML" is not a valid format option. Only "xml" and "csv" are valid options. | ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="24067408-fdaf-4dbf-ad4c-da59555e3ef2"><ac:plain-text-body><![CDATA[ | |||||
http://ebird.org/ws1.0/ref/country [http://localhost/ws/ref/][][country][/find?match=united] |
| CSV list of 5 countries in CSV format |
| ||||||
http://localhost/ws/ref/country/find?match=united&format=xml | ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="da8e4617-45cb-40f0-9f1e-8c771140177f"><ac:plain-text-body><![CDATA[ | [http://localhost/ws/ref/][][country][/find?match=united&format=xml] |
| XML list of 5 countries |
| ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6a2af42f-4575-459a-8429-78ce4cdbff89"><ac:plain-text-body><![CDATA[ | |
http://ebird.org/ws1.0/ref/country [http://localhost/ws/ref/][][country][/find?match=UNITED] | CSV list of 5 countries in CSV format | There should be no difference in response for upper/lower case search strings. | ]]></ac:plain-text-body></ac:structured-macro> | ||||||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="bba359c9-6f9b-4b43-acbc-a203b0cce359"><ac:plain-text-body><![CDATA[ | [http://localhost/ws/ref/][][country][/list?format=] | entire list in CSV format | Bad format value is ignored and defaulted to csv. | ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="546b8ce8-3c8c-438e-abff-b3f44b71665b"><ac:plain-text-body><![CDATA[ | [http://localhost/ws/ref/][][country/][find?match=] | |||
empty list in CSV format | ]]></ac:plain-text-body></ac:structured-macro> |
CSV Result Format
Panel |
---|
<country code>, <name associated with country code> |
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="something"/> </criteria> <comment> </comment> </header> <result> <location countryCode="" >name of the country </location> <location countryCode="" >name of the country </location> <location countryCode="" >name of the country </location> </response> |