POST /system/weather/locations/
Use this resource to obtain the weather service configuration for a given location ID.
This resource is used to set the weather location.
There are multiple ways to set the weather location. If multiple information is sent simultaneously, the data will be prioritized based on the following order.
First: You can send the city key.
Example :
{
\"key\": \"328763\"
}
Second: You can send the concatenated city coordinates. (The latitude is always in the first position).
Example :
{
\"ll\": \"39.802,-89.644\"
}
Third: You can send the city coordinates separately.
Example :
{
\"latitude\": \"39.802\",
\"longitude\": \"-89.644\"
}
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.
There are multiple possible values according the resource:
If this parameter is not present during the request, and error 415 Unsupported Media Type will be thrown.
The Content-Length entity-header field indicates the size of the entity-body.
This is the ID of the location.
Currently only one location is supported. The only ID available is 1
.
Object Name: Location
Property Name | Type | Description | Method |
---|---|---|---|
Longitude | String | The longitude of the selected city. | GET |
Latitude | String | The latitude of the selected city. | GET |
Ll | String | This is the Latitude and Longitude, in that order. The two values must be separated with a space or a comma. |
GET |
Enabled | Boolean | True to enable the Weather functionality. | GET |
Name | String | Name of the selected city. | GET |
Key | String | Key representing the selected city. | GET |
URL Example: https://0.0.0.0/api/rest/v1/system/weather/locations/1
{
"enabled": true,
"latitude": "39.802",
"longitude": "-89.644"
}
URL Example: https://0.0.0.0/api/rest/v1/system/weather/locations/1
{
"enabled": true,
"latitude": "39.802",
"longitude": "-89.644"
}
URL Example: https://0.0.0.0/api/rest/v1/system/weather/locations/1
{
"enabled": true,
"latitude": "39.802",
"longitude": "-89.644"
}
URL Example: https://0.0.0.0/api/rest/v1/system/weather/locations/1
<?xml version="1.0" encoding="utf-8"?>
<Location>
<Enabled>true</Enabled>
<Key>328763</Key>
</Location>
URL Example: https://0.0.0.0/api/rest/v1/system/weather/locations/1
<?xml version="1.0" encoding="utf-8"?>
<Location>
<Enabled>true</Enabled>
<Key>328763</Key>
</Location>
URL Example: https://0.0.0.0/api/rest/v1/system/weather/locations/1
<?xml version="1.0" encoding="utf-8"?>
<Location>
<Enabled>true</Enabled>
<Key>328763</Key>
</Location>