This uses the Measured water levels and creates a JSON API.

Source code available on Github.

Documentation

Important notice: The time is given in Western European Time all year, the European Summer Time is not considered. You may have to adapt the time to your needs.

Root

https://heichwaasser.lu/api/v1

Endpoints

Rivers

[
    {
        "id": 17,
        "name": "Alzette",
        "stations": [
            {
                "id": 61,
                "city": "Ettelbr\u00fcck",
                "latitude": 49.84373,
                "longitude": 6.09713,
                "trend": "rest",
                "current": {
                    "timestamp": "2017-12-27T16:45:00",
                    "value": 69.8,
                    "unit": "cm"
                },
                "minimum": {
                    "timestamp": "2017-12-27T15:30:00",
                    "value": 65.5,
                    "unit": "cm"
                },
                "maximum": {
                    "timestamp": "2017-12-27T16:45:00",
                    "value": 69.8,
                    "unit": "cm"
                },
                "alert_levels": [
                    {
                        "name": "Level 1",
                        "value": 180,
                        "unit": "cm"
                    },
                    {
                        "name": "Level 2",
                        "value": 230,
                        "unit": "cm"
                    }
                ]
            },...
        ]
    }
]
[
    {
        "id": 17,
        "name": "Alzette",
        "stations": [
            {
                "id": 61,
                "city": "Ettelbr\u00fcck",
                "latitude": 49.84373,
                "longitude": 6.09713,
                "trend": "rest",
                "current": {
                    "timestamp": "2017-12-27T16:45:00",
                    "value": 69.8,
                    "unit": "cm"
                },
                "minimum": {
                    "timestamp": "2017-12-27T15:30:00",
                    "value": 65.5,
                    "unit": "cm"
                },
                "maximum": {
                    "timestamp": "2017-12-27T16:45:00",
                    "value": 69.8,
                    "unit": "cm"
                },
                "alert_levels": [
                    {
                        "name": "Level 1",
                        "value": 180,
                        "unit": "cm"
                    },
                    {
                        "name": "Level 2",
                        "value": 230,
                        "unit": "cm"
                    }
                ]
            },...
        ]
    }
]

Stations

[
    {
        "id": 81,
        "river": {
            "id": 3,
            "name": "S\u00fbre"
        },
        "city": "Bigonville",
        "latitude": 49.86875,
        "longitude": 5.79996,
        "trend": "rest",
        "current": {
            "timestamp": "2017-12-27T16:45:00",
            "value": 108.2,
            "unit": "cm"
        },
        "minimum": {
            "timestamp": "2017-12-27T16:45:00",
            "value": 108.2,
            "unit": "cm"
        },
        "maximum": {
            "timestamp": "2017-12-27T16:45:00",
            "value": 108.2,
            "unit": "cm"
        },
        "alert_levels": [
            {
                "name": "Level 1",
                "value": 250,
                "unit": "cm"
            },
            {
                "name": "Level 2",
                "value": 300,
                "unit": "cm"
            }
        ]
    },...
]

The measurements are displayed in a descending order.

{
    "id": 81,
    "river": {
        "id": 3,
        "name": "S\u00fbre"
    },
    "city": "Bigonville",
    "latitude": 49.86875,
    "longitude": 5.79996,
    "trend": "rest",
    "current": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "minimum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "maximum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "measurements": [
        {
            "timestamp": "2017-12-27T16:45:00",
            "value": 108.2,
            "unit": "cm"
        },..
    ],
    "alert_levels": [
        {
            "name": "Level 1",
            "value": 250,
            "unit": "cm"
        },
        {
            "name": "Level 2",
            "value": 300,
            "unit": "cm"
        }
    ]
}

The measurements are displayed in an ascending order.

{
    "id": 81,
    "river": {
        "id": 3,
        "name": "S\u00fbre"
    },
    "city": "Bigonville",
    "latitude": 49.86875,
    "longitude": 5.79996,
    "trend": "rest",
    "current": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "minimum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "maximum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "measurements": [
        {
            "timestamp": "2017-12-27T16:45:00",
            "value": 108.2,
            "unit": "cm"
        },..
    ],
    "alert_levels": [
        {
            "name": "Level 1",
            "value": 250,
            "unit": "cm"
        },
        {
            "name": "Level 2",
            "value": 300,
            "unit": "cm"
        }
    ]
}

The measurements are displayed in a descending order and limited to :count items.

{
    "id": 81,
    "river": {
        "id": 3,
        "name": "S\u00fbre"
    },
    "city": "Bigonville",
    "latitude": 49.86875,
    "longitude": 5.79996,
    "trend": "rest",
    "current": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "minimum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "maximum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "measurements": [
        {
            "timestamp": "2017-12-27T16:45:00",
            "value": 108.2,
            "unit": "cm"
        },..
    ],
    "alert_levels": [
        {
            "name": "Level 1",
            "value": 250,
            "unit": "cm"
        },
        {
            "name": "Level 2",
            "value": 300,
            "unit": "cm"
        }
    ]
}

The measurements are displayed in an ascending order and limited to :count items.

{
    "id": 81,
    "river": {
        "id": 3,
        "name": "S\u00fbre"
    },
    "city": "Bigonville",
    "latitude": 49.86875,
    "longitude": 5.79996,
    "trend": "rest",
    "current": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "minimum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "maximum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "measurements": [
        {
            "timestamp": "2017-12-27T16:45:00",
            "value": 108.2,
            "unit": "cm"
        },..
    ],
    "alert_levels": [
        {
            "name": "Level 1",
            "value": 250,
            "unit": "cm"
        },
        {
            "name": "Level 2",
            "value": 300,
            "unit": "cm"
        }
    ]
}

The returned measurements are strictly greater than the start timestamp and strictly smaller than the end timestamp.

The measurements are displayed in a descending order.

:timestamp must be provided as UNIX timestamp in seconds since Jan 01 1970.

{
    "id": 81,
    "river": {
        "id": 3,
        "name": "S\u00fbre"
    },
    "city": "Bigonville",
    "latitude": 49.86875,
    "longitude": 5.79996,
    "trend": "rest",
    "current": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "minimum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "maximum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "measurements": [
        {
            "timestamp": "2017-12-20T00:15:00",
            "value": 133.6,
            "unit": "cm"
        },..
    ],
    "alert_levels": [
        {
            "name": "Level 1",
            "value": 250,
            "unit": "cm"
        },
        {
            "name": "Level 2",
            "value": 300,
            "unit": "cm"
        }
    ]
}

The returned measurements are strictly greater than the start timestamp and strictly smaller than the end timestamp.

The measurements are displayed in an ascending order.

:timestamp must be provided as UNIX timestamp in seconds since Jan 01 1970.

{
    "id": 81,
    "river": {
        "id": 3,
        "name": "S\u00fbre"
    },
    "city": "Bigonville",
    "latitude": 49.86875,
    "longitude": 5.79996,
    "trend": "rest",
    "current": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "minimum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "maximum": {
        "timestamp": "2017-12-27T16:45:00",
        "value": 108.2,
        "unit": "cm"
    },
    "measurements": [
        {
            "timestamp": "2017-12-20T00:15:00",
            "value": 133.6,
            "unit": "cm"
        },..
    ],
    "alert_levels": [
        {
            "name": "Level 1",
            "value": 250,
            "unit": "cm"
        },
        {
            "name": "Level 2",
            "value": 300,
            "unit": "cm"
        }
    ]
}
Explanation of "trend" field

On import the new water level is compared to the previous one, and the trend field is updated.

  • down new level < previous level
  • rest new level = previous level
  • up new level > previous level

Discussions

Discussion between the organization and the community about this dataset.