| 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="0e9d1d8e-a8c7-4713-a7bf-971a37f7a461"><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="11ad0086-94ed-475f-b512-c7326b2a5ff7"><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="61802327-87a9-4853-bdcc-d173764c1d4f"><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="26b4c013-f19e-470e-ba21-8fac4532f148"><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="d226d2ba-c2ac-46cf-b780-f2d91a7b75e9"><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="45beeabb-0067-49b7-9936-86b4e7efb87f"><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="30662767-36f9-411f-a538-6f525da14c12"><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="c5724fa4-67db-4ef7-9237-d40fe5ab563d"><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="c9f23025-4080-446a-a706-5d5d7f8c231a"><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>
|