ropensci / ruODK

ruODK: An R Client for the ODK Central API
https://docs.ropensci.org/ruODK/
GNU General Public License v3.0
42 stars 13 forks source link

Using with Kobo Toolbox #71

Closed dmenne closed 4 years ago

dmenne commented 4 years ago

I am a little confused when it comes to the terminology of Kobo, ODK Central, ODK Collect.

Trying to use ruODK with Kobotoolbox. Everything works fine with something like:

https://kf.kobotoolbox.org/api/v2/assets?format=json

in Postman and Basic Authentication. I can also use ODK Briefcase without problem. The following did not work, though:

ruODK::ru_setup(
  fid = "Beispiele",
  url = "https://kf.kobotoolbox.org",
  un = "mylogin",
  pw = "mypassword"
) 
florianm commented 4 years ago

Hi Dieter,

thanks for your interest in ruODK! Unfortunately, ruODK is an R client specifically for the ODK Central API, not the KoBo toolbox API.

XLSForms and XForms are two different standards for digital forms. ODK Collect is a mobile data capture app. ODK Central is the corresponding data clearinghouse from which ODK Collect receives form templates and uploads filled out form instances and media attachmets to. ODK Central supports XLSForms from version 0.7. It has the classic JavaRosa API, a RESTful API, and some OData API enpdoints, together with a fantastic API reference with live examples. ruODK uses a happy mix of ODK Central's RESTful and OData API endpoints. KoBo Toolbox is built around XlsForms and has a different API to ODK Cental. ODK Briefcase is a desktop client to access ODK Aggregate or Central's JavaRosa API.

While ruODK will likely not work with the KoBo toolbox API, it solves problems around downloading and parsing data which you might be able to build upon in your own R scripts.

Of interest could be:

Does this help you at all?

dmenne commented 4 years ago

Yes, thanks. I just switched to ODK Central for testing on my server. The R-code might be nice to have, even if I am R-guy by default.

florianm commented 4 years ago

Great, give us a yell if you get stuck anywhere between ODK Central and ruODK!

dmenne commented 4 years ago

I just migrated to ODK-Central via DigitalOcean and found that the link to ruODK is displayed. Great! Two years ago I had already tried ODK, and it was a rather messy installation. Installation on my own server failed because I alread had nginx and mail server in docker, and I was too lazy to try to fiddle with docker-compose, but installation on a virgin Ubuntu was easy.

florianm commented 4 years ago

Tearing up the docker-compose install is a special kind of pain, yep :-) We managed to run ODK Central in k8s with existing db cluster, mail server, and reverse proxy (ssl certs). I've documented the setup in forum.getodk.org