waterlevel
Description:
This POST method is used for getting the water level of or more lake(s) at a certain date and time.
If no date and time is given the latest observation of water level is returned.
If date and time is given the latest observation of water level taken before that date and time is returned.
Minlevel and maxlevel are the min and max levels for allowed waterlevels. If level i "1" then the min and max levels should appear
in the presentation.
Precondition: The client must supply a valid api-key.
How to call this method:
url: https://api.tekniskaverken.se/waterlevel
Mandatory http-headers:
X-auth-apikey: api-key that has been supplied by ICC
Input to method:
{
"lake" : "roxen", //"glan", "jarnlunden", "roxen", "sommen", "vattern"
"dt" : "2016-11-20 21:00:30"
}
Allowed combinations:
Returns the latest water level for all lakes
{
"lake" : "roxen" Returns the latest water level for one lake
}
{
"lake" : "roxen", Returns the latest water level for one lake before the date and time stated in dt
"dt" : "2016-11-20 21:00:30"
}
{
"dt" : "2016-11-20 21:00:30" Returns the latest water level for all lakes before the date and time stated in dt
}
Output from method:
{
"levels" : [
{
"lake" : "roxen",
"lakename" : "Roxen",
"observationdt" : "2016-02-17T09:00:00.0000",
"level" : "33.2",
"levellimit" : "0",
"minlevel" : "33.0",
"maxlevel" : "34.6"
},
{
"lake" : "jarnlunden",
"lakename" : "Järnlunden",
"observationdt" : "2016-02-17T09:00:00.0000",
"level" : "41.3"
"levellimit" : "1",
"minlevel" : "41.0",
"maxlevel" : "42.6"
},
],
"code" : 0, = failed to fetch water levels, 1 = water levels fetched successfully
"message" : error message or other information about the method execution
}