Request
Endpoint:
|
/api/cities
|
Method:
|
GET
|
Headers:
|
Accept: application/vnd.cloudlx.v1+json
|
Authorization: Bearer <access_token>
|
Optional GET request parameters
continent_id
|
Description
|
The ID of the continent where the city is located
|
Type
|
Integer
|
Example
|
2
|
country_id
|
Description
|
The ID of the country where the city is located
|
Type
|
Integer
|
Example
|
2
|
Response
Example:
{
"cities": [
{
"id": 1,
"name": "Atlanta",
"country": {
"id": 455,
"name": "United States",
"continent": {
"id": 2,
"name": "AMERICAS",
}
},
},
{
"id": 2,
"name": "New York City",
"country": {
"id": 455,
"name": "United States",
"continent": {
"id": 2,
"name": "AMERICAS",
}
},
},
...
]
}
id
|
Description
|
The id of the city
|
Type
|
Integer
|
Example
|
1
|
name
|
Description
|
The city name
|
Type
|
String
|
Example
|
Atlanta
|
country
|
Description
|
An object of the country the city exists in
|
Type
|
Object
|
Example
|
N/A
|