Can we download submissions made to the whole project at once?

I am currently working on a project, and I'm in need of a way to export all the submissions made to the entire project at once. I have searched for an API that could help me achieve this, but unfortunately, I haven't found any that allows exporting all project submissions in one go. Currently, I can only download submissions for each individual form, which is not ideal for my requirements.

Additionally, I am also looking for an API that provides the total count of submissions made to the project. Unfortunately, I haven't come across such an API yet.

Would you kindly assist me in finding a solution to these challenges? I would greatly appreciate any help or guidance you can provide in making this process more efficient and streamlined. Thank you for your support!

Hi @Niraj_Adhikari! You're right that there aren't API endpoints for the following:

Could you provide more details about the high-level problem you're trying to solve? How specifically would this functionality be helpful to you?

If you're wanting to watch the total count of submissions to determine whether you need to fetch submissions, you might want to try out the /v1/audits endpoint. You could watch the events returned by that endpoint, including events for submission creation and editing.

1 Like

Hi @Matthew_White

I am currently working on a project where we need to download submissions from all the forms. We are using ODK in a Field Mapping Tasking Manager for HOTOSM . In this project, we clone a form and divide it into several multiple forms for different locations.

Our goal is to upload the information to OSM. However, the current approach of downloading data from each form individually is proving to be inefficient and not scalable. I was wondering if there is an API or a better method available that allows us to download all the submissions from all the projects at once.

Thank you for your assistance.

Quick question from the sidelines: are you using R or Python?

You could run ruODK::odata_submission_get() on each form, which downloads all submissions (fast) plus any media (slow, but skips already downloaded ones) as a script that runs on a schedule. Then you can export the downloaded data as csv and/or save as .rds for later use in R.

There's a similar path available in pyodk.

@Florian_May
I am using python.
Can I still use this?

Hi all,

If I made a PR to do this, would it be accepted?

Something like:

/projects/:projectId/submissions

Or more specific to the requirements (as we just need the total number of submissions for a project):

/projects/:projectId/submissions_count

I realise we may not be using ODKCentral in the way it was initially designed, so this may not be a desired endpoint.

Thanks!

1 Like

Absolutely! The docs are at https://getodk.github.io/pyodk/.
Have also a look at the ODK Central APi docs https://odkcentral.docs.apiary.io/# and examples there.

2 Likes

@spwoodcock thanks for the offer! I can imagine the API endpoint would be great in dashboards.

New feature requests should be posted to the Features category. Community support there is also used by the core team to gauge interest and triage the priority.

I think this can be closed as we found what we needed in Entities :smile: