Query City List

Last Updated on : 2023-07-06 08:28:12download

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 nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
idStringThe ID of a specified province.
nameStringThe name of a province or state.
citiesListThe list of cities under the province.

Description of cities

Parameter nameTypeDescription
idStringThe ID of a specified city.
nameStringThe 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.