Is there an API to query data from form(s)?

We are developping a web system which will work on data collected using ODK-Collect / ODK-Aggregate.
We thought that Aggregate would be our direct API, so we wouldn't have to mirror the collected data to another database. For this to be possible, we need to be able to query data from forms, like for example: "give me all data from form 'students' where 'age' field is above 16 years".
Is it possible?
If not, how do developers normally do? Do they mirror the data in mirror databases using the streaming API for publishing each new submission?

1 Like

See for your options. I tend to pull data out using ODK Briefcase, but if you are deploying with Tomcat backed with MySQL/PostgreSQL, you could write whatever queries (although that fragile).

You can also try the ODK Central server. It's still early in its development, but it has RESTful API and OData feed which might work well for querying the data.


We are working on TomCat/MySQL, but we would rather not query the database directly.

We are thinking about publishing each submission to a Django JSON server, so that we can produce our analysis there.

It would be better to have a direct REST API allowing for queries in the submission data, though. ODK Central is not ready for us specially because it doesn't allow editing an already submitted instance. We need that for a moderator to check, qualify and validate submissions.

So maybe it's better to just mirror the submissions in django, and work on them from there on for outputs as reports, maps, charts and the dynamics of submission moderation.

It would be nice to have a community in this forum to exchange about getting data out of ODK and using it to develop visualization applications.