This REST Web service contains 241 countries complies with ISO 3166-1. The country name is available in seven languages (French, English, ...). The Web service also included the 3 digit code of the country, the 2-letter code (used in many applications, including monetary applications ) and the 3-letter code.
For information, the information for country France , will be the following
- Code ISO 3166-1 numérique : 250
- Code ISO 3166-1 alpha2 : FR
- Code ISO 3166-1 alpha3 : FRA
These are the currently supported languages
- Czech
- German
- English
- Spanish
- French
- Italian
- Dutch
Does flags-rest-service not support your language? Please help us with a PR!
- HTML
- CSS
- AngularJS 1
- AngularJS 2 in progress...
- Spring Boot
- Spring Web
- Spring Actuator
- SVG
- TestNG
- Travis CI
Flags REST Service apps run anywhere the JVM does. Deploy standalone, in an app server, on a Cloud or all of the above.
UX (AngularJS 1):
use cases:
- http://localhost:8084/flags/api/countries return a list of countries (in English)
- http://localhost:8084/flags/api/countries?lang=en return a list of countries (in English)
- http://localhost:8084/flags/api/countries?lang=fr return a list of countries (in French)
- http://localhost:8084/flags/api/fr return 200 OK and svg (French flag)
- http://localhost:8084/flags/api/fr/40/40 return 200 OK and png (French flag)
Errors cases:
- http://localhost:8084/flags/api/countries?lang=fakecode return a list of countries (in English)
- http://localhost:8084/flags/api/fakecode return 204 No Content
- http://localhost:8084/flags/api/fakecode/40/40 return 204 No Content
UX (sample CORS with public_client in 8085 server):
UX (sample CORS with public_client out 8085 server):
[...,{"num":250,"alpha2":"FR","alpha3":"FRA","label":"France"},...]
- http://localhost:8088/health (CAUTION: login/password) return {"status":"UP"}
The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests.
For pull requests, editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at http://editorconfig.org.