You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

CountryCode List and Search Web Service 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

  • csv
  • xml

format to use for response

not coded

Test URLS

Development URL

Deployed URL

Expected Response

Notes

http://localhost/ws/ref/country

 

 

What do we want here? 404? Redirect to /ws/ref/country/list?

http://localhost/ws/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="82c0876a-85de-47d9-b431-81a3ae2a017d"><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="54b79de1-6fc7-4cc5-8889-61b2f8c6cc24"><ac:plain-text-body><![CDATA[

[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="69d2f543-4fc3-433d-b0f9-338ffc9dd2f4"><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="b9c2b043-131f-46b4-90bf-273b2a7e7951"><ac:plain-text-body><![CDATA[

[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="22ebd9a1-d61d-4984-954d-fdcf21702117"><ac:plain-text-body><![CDATA[

[http://localhost/ws/ref/][][country][/find?match=united]

 

CSV 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="eb5fe747-d487-4eba-9783-a950a33cf8ec"><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="e7e354a4-f021-48cd-b15b-1a6cafc6bad7"><ac:plain-text-body><![CDATA[

[http://localhost/ws/ref/][][country][/find?match=UNITED]

 

CSV list of 5 countries

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="832a938c-8cb1-4380-aa2f-3ffd1fbbc61f"><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="c8875c66-0bf3-4aec-b2d8-c5928e35a3f6"><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

<country code>, <name associated with country code>
<country code>, <name associated with country code>
<country code>, <name associated with country code>

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"/>
    </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>
  • No labels