Akvo Flow API
Above: Connection at the Stedelijk Museum in Amsterdam. Photograph by Ruud van der Werf, 2014.
You capture data. Actually, you capture a lot of data. This month we celebrated a great milestone in Akvo Flow: over 5 million forms have been submitted with our tool. But what happens after you hit the submit button? How can you get the data out, understand it and make value of it? Besides Flow’s frequently used view data and data exports functionality, or the newly introduced direct link between Flow and Lumen, you can use Flow’s API.


API? What is that?
An API, Application Programming Interface, can be understood as a set of requirements that make it possible for one application to talk to another, to move information from one application to another. APIs do all this by “opening up” some of a program’s internal functions to the outside world in a limited fashion. In other words, an API is a messenger that allows applications to interact with each other.

What’s in it for me?
Why should I invest in a technical connection like Flow’s API if I already have the two options mentioned above to use my data? 

Using Flow’s API, you can get your data out of Flow and into your database, show your data on a website or publish it on a data sharing platform automatically. The options are countless. Some of our partners already use Flow’s API. With WPDx (Water Point Data Exchange), we are working to create a connection to publish your data openly on the WPDx portal.

“Our mission at WPDx is to unlock the potential of water point data in order to improve learning and decision making. Part of this mission is achieved by collaborating with the WASH community in order to increase the sharing of data. Collaboration is always increased when collaboration is made easy, and this is where the API comes into play.

Before the API, there was no way for people who used Flow to automatically share data with WPDx. Instead, they had to download their data, share the downloaded file and then re-upload it. With the API, we hope to automate processes that people are currently doing by hand. Automation will reduce some of the key barriers to data sharing. Our hope is that, with the new API, Akvo Flow users will be able to seamlessly share their data in near real-time.” 

Brian Banks, Director of Strategic Initiatives at Global Water Challenge.
Our partner, Acacia, takes data captured with Flow and combines it with data from other sources to publish on their website and showcase the quality of the water on the Dutch island of Texel.

“As a consultancy firm in groundwater, we offer sustainable and practical solutions to water issues worldwide. We partnered with Akvo to create a participatory water monitoring system whereby farmers and waterboards collectively map the quality of surface water in the Netherlands.

Farmers use Akvo Flow on their smartphones to get a real-time view of water quality in their regions. The data collected by the farmers is fed through the API into our websites, such as Texelmeet.nl, where it is combined with data from other sources. That way, farmers can make sure the water quality is high enough to irrigate their crops and increase their yields, while water boards are notified when water quality levels are dropping. This system allows for freshwater in the region to be managed based on accurate and comprehensive data, leading to better insights and decisions.”

Theo Kleinendorst, Senior Hydrogeologist at Acacia Water.
freshwater monitoring system
Above: A screenshot of the Texelmeet.nl website showing a map of data points on Texel. 
But we also make use of Flow’s API within Akvo. Flow and Lumen are connected through the API, and our team have built some helpful tools that support our partners with tracking data collection or understanding the captured data.

“We were recently running a project in Vietnam with SNV which aimed to reinvigorate the biogas market by incentivising growth in biogas enterprises. For each biogas installed, the engineer would receive a set amount of money. As the project got started, issues were encountered with duplicate data in Akvo Flow. Every time a biogas enterprise retrieved the data, there would be a number of duplicates and employees would have to manually search through the excel sheets to identify them.

To solve this problem, we designed a notification system within the new API so that users could automatically detect the duplicate data without having to do any manual work. The automated mailing client means that you can receive notifications of duplicate content at chosen intervals, enabling you to keep a high quality data level.”

Joy Ghosh, Programme and technical advisor, Akvo SEAP.
Over the last months, we have been working on improving our v1 Flow API. We now have v2 in place and are ready to expand our early adopters group to get more feedback on the API in order to improve it further. The Akvo Flow v2 REST API is a read-only API. All requests to the API are sent over HTTPS and are accessed via the base URL. All information regarding the Akvo Flow API can be found in the GitHub repository and its Wiki page. The v2 has a more clear structural design and response format and, for example, you can now get all your response data with a single call, rather than having to making separate calls per single submission. With the v2 API being ready for you to make even more use of the data, we will also be deprecating v1 in 8 months time. Find out whether you are affected by this change and what you need to do.

If you are curious to learn how you can use our API and want to help us grow our early adopters group, don’t hesitate to contact us at flowsupport@akvo.org.

Jana Gombitova is Product manager for Akvo Flow. You can follow her on Twitter @janagombitova.