watervalueseries
Description:
This POST method is used for getting a series of observations of water level or tap flow or both for a certain lake and date period.
The combination "resolution" : "year" is implemented but does not work for measurement : "all"
Data for "day" and "week" are only available up to the previous day or week, not for the current day or week.
Precondition: The client must supply a valid api-key.
How to call this method:
url: https://api.tekniskaverken.se/watervalueseries
Mandatory http-headers:
X-auth-apikey: api-key that has been supplied by ICC
Input to method:
{
"lake" : "roxen", // "glan", "jarnlunden", "roxen", "sommen", "vattern"
"measurement" : "level", // "level", "tapping", "all"
"resolution" : "day", // "day", "week", "year"
"week" : "201641", // week number
"year" : "2016",
"years" : { // Not yet implemented
"yearfrom" : "1997",
"yearto" : "2016"
}
}
Allowed combinations:
{
"lake" : "roxen",
"measurement" : "level",
"resolution" : "day",
"week" : "201641"
}
{
"lake" : "roxen",
"measurement" : "level",
"resolution" : "week",
"year" : "2009"
}
{
"lake" : "roxen",
"measurement" : "tapping",
"resolution" : "week",
"year" : "2009"
}
{
"lake" : "roxen",
"measurement" : "all",
"resolution" : "week",
"year" : "2009"
}
{
"lake" : "roxen",
"measurement" : "level",
"resolution" : "year",
"years" : {
"yearfrom" : "1997",
"yearto" : "2016"
}
}
Output from method:
When "measurement" is "level" or "tapping":
{
"lake" : "roxen", // "glan", "jarnlunden", "roxen", "sommen", "vattern"
"lakename" : "Roxen",
"measurement": "level",// "level", "tapping"
"resolution" : "week", // "day", "week", "year"
"year" : "2009" [m] // "week", "year", "years" {"yearfrom", "yearto"}
"minlevel" : "32,4", // if limit applies
"maxlevel" : "34,6",
"mintapping" : "2", // if limit applies
"maxtapping" : "21",
"values" : [
{
"week" : "200901", // ["daynr", "dayname"], "week", "year"
"level" : "33.2" // "tapping" :
},
{
"week" : "200902",
"level" : "33.1"
},
et.c.
],
"code" : 0, = failed to fetch water levels, e.g. if none of the requested data are defined
1 = water levels fetched successfully,
2 = warning, not all data could be delivered e.g. if level is not defined but tapping is defined
"message" : error message or other information about the method execution
}
When "measurement" is "all":
{
"code": 1,
"lake": "jarnlunden",
"lakename": "Järnlunden",
"measurement": "all",
"resolution": "week",
"year": "2016",
"values": [
{
"week": "201601",
"level": "85.89",
"tapping": "4.37"
},
{
"week": "201602",
"level": "85.88",
"tapping": "7.09"
},
et.c.
]
}
When "resolution" is "day":
{
"code": 1,
"lake": "roxen",
"lakename": "Roxen",
"resolution": "day",
"week": "200732",
"values": [
{
"daynr": "1",
"dayname": "mån",
"level": "34",
"tapping": "167.46"
},
{
"daynr": "2",
"dayname": "tis",
"level": "33.99",
"tapping": "161.07"
},
et.c.
]
}