Query City List

Last Updated on : 2023-06-15 05:05:44

Query a list of cities supported by automation and tap-to-run. Currently, only cities in China can be returned.

API address

GET: /v2.0/iot-03/automations/cities

Return parameter

Parameter name Type Description
result List The returned result.

Description of result

Parameter name Type Description
id String The ID of a specified province.
name String The name of a province or state.
cities List The list of cities under the province.

Description of cities

Parameter name Type Description
id String The ID of a specified city.
name String The name of a specified city.

Request example

GET: /v2.0/iot-03/automations/cities

Return example

{ "result": [ { "cities": [ { "name": "Fuzhou City", "id": "79340954706575****" } ], "name": "Fujian Province", "id": "79341683851932****" } ], "t": 1631869578413, "success": true }

Error code

For more information, see error code.