- Home
- API Enriched
- Tenant And Identity
- web
- List cities.
List cities.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/web/custom/countries/example/states/example/cities/example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/web/custom/countries/example/states/example/cities/example \ --header 'Authorization: <Authorization>'Returns a list of known cities of a country/state.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Country code
2 characters country code as described in https://en.wikipedia.org/wiki/ISO_3166-1, column alpha-2
State code
2 characters country code as described in https://en.wikipedia.org/wiki/ISO_3166-2:US/CA/IN, column code, excluding the leading country code.
Prefix first two or more characters of the city you look for (can be upper or lower case)
Responses
Section titled “Responses”A successful response.
ListCitiesResponse contains a list of cities (for a country) supported by the platform.
object
List of all cities in.
CityItem contains a single element of city list response.
object
Any additional information related to the city.
object
Name of the city in the human readable form (can be used as a description)
Example
{ "error_code": "EUNKNOWN"}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example