Using the Kobo REST API (https://kc.kobotoolbox.org/api/v1/)


#1

Hi,

This is a general question about the future of the REST API, and the legacy kc.kobotoolbox.org platform in general.

Background / Context
I’m part of a team developing products for use with Kobotools. We’ve been using the REST API to good effect, to help users deploy forms, collect data via Kobotoolbox, then automatically pull data from multiple forms into a single external database.

Specifically, we’re pushing forms by POSTing to /api/v1/forms, sharing forms with /api/v1/forms/{pk}/share, and pulling the data with GET requests to /api/v1/data

Our systems are working well, with the following caveat: All the forms we push only show up in the ‘legacy’ interface (kc.kobotoolbox.org). This is fine, but a bit confusing to users, given the modern interface is the default one.

From discussion with the Kobo team, I learnt this is because the Sync between kc. and kf only works 1-way, so forms uploaded or pushed to the legacy database are not synchronised to the modern database. In addition, the ‘legacy’ interface is being phased out in the coming months.

My Question
Is there an alternate api we should be using, which will be compatible with the “modern” Kobotools interface? I’m a little concerned that if the legacy platform is going away, will the API also stop working? I’d like to get ahead and figure out a better way of linking to the Kobotools platform before that happens!

Any insights from fellow developers and Kobotools power users would be really appreciated,

Thanks,
~ Dave


#2

Quick update here:

The help page for the REST API has been recently updated. It now says:

Originally kc was the only api for deploying forms and retrieving data. Now, kpi is the primary API that should be used.

I guess I should now be using https://kf.kobotoolbox.org/ with assets, submissions and exports as described on the help page.

However, the whole API seems quite incomplete (or maybe it’s just the documentation that’s incomplete). Does anyone have any examples of using this new API to do the following tasks:

  • Upload an XLS file (in XLSForm Format) to create a new form/project
  • Share an existing form with another user
  • Retrieve the data collected from a project in JSON format.

If any Kobo devs are reading this, I’m also happy to help test the API if needed, and can help with documentation if it could help others in the future.

Thanks,
Dave.


#3

@Dave, thanks for raising this issue. What will happen to projects designed using xlsform and uploaded to legacy?. We have to also start using the kpi to avoid downtime.

Reverton