The Scottish Environment Protection Agency (Sepa) confirmed that it was responding to a significant hacking incident affecting its contact centre, internal systems, processes and communications on 24 December.
A criminal investigation into the incident is under way.
The organisation remained able to access the data that was compromised, so nationally important flood forecasting and warning were not affected in the wake of the attack.
However, the figures were not accessible on public web pages.
The situation has now been largely rectified, although work to fully restore historical and rainfall data is ongoing.
Vincent Fitzsimons, Sepa's head of hydrology, said: “We appreciate how valuable our river level data is, from those planning leisure activities to people looking for additional information during flooding.
“Flood alerts and warnings are always the most up-to-date information, but when river levels are very high and warnings are out we know residents use the site to see whether levels upstream are continuing to rise or have started to fall.
“Since the cyber-attack on Christmas Eve our staff have worked as quickly as possible to restore public access, and this is an important step in the restoration of information that we know people use.”
Sepa’s emergency management team has been working with Scottish Government, Police Scotland and the National Cyber Security Centre to respond to what has been described as a “complex and sophisticated criminality”.