Exchanging data protocol between Aggregate and Collect


#1

Hello
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?


(Yaw Anokwa) #2

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


#3

OpenRosa :hushed: interesting!

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


(Dr. Gareth S. Bestor) #4

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)


(Yaw Anokwa) #5

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/.


#6

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!!


(Dr. Gareth S. Bestor) #7

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.


#8

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?


(Dr. Gareth S. Bestor) #9

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.


#10

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?


(Yaw Anokwa) #11

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.