GET /system/weather/autocomplete
Use this resource, with a query parameter, to obtain a list of cities whose name corresponds to the query.
Used when you are operating a browser without access to the header parameter. This allows you to choose which encoding you want to use for the response:
All these resources can be used according what the resource allows.
The $expand system query option specifies the related resources to be included in line with retrieved resources.
The value passed in the parameter can be:
The $expand system query option can be used with the $levels query option, to expand recursively.
If this parameter is not in the request, the Application/Json will be chosen by default.
There are multiple possible values (according the resource):
The first two are the most often used.
Object Name: City
Property Name | Type | Description | Method |
---|---|---|---|
Name | String | Name of the selected city. | GET |
Key | String | Key representing the selected city. | GET POST |
Object Name: Cities
Property Name | Type | Description | Method |
---|---|---|---|
Cities | Array<City> | Cities returned by the autocomplete research. | GET |
URL Example: https://0.0.0.0/api/rest/v1/system/weather/autocomplete?query=springfield
[
{
"key": "328763",
"name": "Springfield, IL, US"
},
{
"key": "329324",
"name": "Springfield, MA, US"
},
{
"key": "329438",
"name": "Springfield, MO, US"
}
]
URL Example: https://0.0.0.0/api/rest/v1/system/weather/autocomplete?query=springfield
<?xml version="1.0" encoding="utf-8"?>
<Cities>
<City>
<Key>328763</Key>
<Name>Springfield, IL, US</Name>
</City>
<City>
<Key>329324</Key>
<Name>Springfield, MA, US</Name>
</City>
<City>
<Key>329438</Key>
<Name>Springfield, MO, US</Name>
</City>
</Cities>