Exchanging data protocol between Aggregate and Collect

I just want to find a document explaining the rules for exchanging form receiving data from server and sending completed questionnaires between the central server (ODK Aggregate) and the mobile client application (ODK Collect) in ODK system.
This could be understood by reading the source code of both parties but should not a specifications document exist before having developed these products?

Is this https://docs.opendatakit.org/odk2/odk-2-sync-protocol/ what I am looking for?

Collect and Aggregate use the OpenRosa APIs to communicate. The documentation for that is at https://docs.opendatakit.org/openrosa/.

OpenRosa :hushed: interesting!

So what is this "Sync protocol" told in the documentation?

FYI if you want to try and drive the Openrosa APIs manually to see exactly what data is getting send back-and-forth, http status codes, etc, some have been documented as curl command-line examples, described in ODK Aggregate form upload via commandline (curl)

1 Like

The ODK 2 sync protocol only works with the ODK 2 tools. You can learn more about the difference between the tools at https://opendatakit.org/software/.

1 Like

Thanks @Xiphware to link me to this very useful example.
We really plan to build our one Aggregate server by using ODK collect.
It's going to be going good too if there is another way to sniff data exchange from ODK collect!!

Before jumping into writing your own Aggregate/ODK server, I highly recommend taking a look at the new ODK Central server. I has a nice REST API, which makes it straight-forward to write clients, and exposes a far greater level of form/submission management via this API than Aggregate (eg deleting forms). Even if you do end up writing your own server, Central may provide some 'inspiration'. :slight_smile:

You might also want to check out ODK Briefcase too if you haven't already.

On paper, Central looks better than Aggregate.
The fact is that I want to keep ODK Collect as client. By the way, what protocol Collect use? OpenRosa or REST?

Both. Central functionality is mostly exposed via its REST APIs, but it supports a sufficient level of openRosa to be compatible with Collect. That is, you can keep using the ODK Collect client with Central.

1 Like

As ODK Collect is just compatible with OpenRosa, does ODK team plan to create another version compatible with REST APIs?
Where is the document about this REST Apis well-documented like OpenRosa?

It's probable that we'll eventually deprecate the OpenRosa APIs and move to more RESTful APIs. That will be a big change across the ecosystem and there is no plan or timeline in place.

The docs for Central's API at https://docs.opendatakit.org/central-api.