Genral WebServices of the OSM.codes
(Draft and review)
All HTTP or HTTPS, GET. See NGINX implementation.
URI template | description |
---|---|
osm.codes |
the domain presentation, home page. |
osm.codes/{countryCode} |
Any ISO 3166-1 alpha-2 or alpha-3 country code. Defines an OSMcodes jurisdiction, as provided for in the Geo URI expansion. Exemples: https://osm.codes/BR for Brazil or https://osm.codes/CO for Colombia. |
osm.codes/{countryCode}-{localGeocode} |
An OSMcodes jurisdiction local geocode resolution. Exemples: https://osm.codes/BR-SP for São Paulo/Brazil or https://osm.codes/BR-SP-Campinas-2345 for postal geocode, http://osm.codes/CO-66170-15NTJ for Colombian's one. |
{countryCode}.osm.codes |
An OSMcodes jurisdiction "hotpage", Country-community's private property in the context of the OSMcodes Condominium. Exemple: future https://CO.osm.codes |
Using PostgREST with NGINX to run PostgreSQL functions at SQL-schema API
.
endpoint | PostgreSQL function and constant parameters |
---|---|
api.osm.codes/jurisdiction_autocomplete |
Returns countries. Example: https://api.osm.codes/jurisdiction_autocomplete for list of countries. |
api.osm.codes/jurisdiction_autocomplete/{code} |
Returns the next subdivision of {code} . Any ISO 3166-1 alpha-2 country code OR any ISO 3166-2 subdivision code. Examples: https://api.osm.codes/jurisdiction_autocomplete/BR for states of Brazil or https://api.osm.codes/jurisdiction_autocomplete/BR-SP for cities of São Paulo/Brazil. |
api.osm.codes/jurisdiction_autocomplete/{code}/{language} |
Any ISO 3166-1 alpha-2 country code OR any ISO 3166-2 subdivision code. {language} can be: en , es , fr or pt . However, name is always returned in the official language of the country. |
.... | .... |
endpoint | PostgreSQL VIEW and query examples |
---|---|
.... | .... |