Example Application using REST APIs

Hello everyone!

I am currently attempting to build an application (a simple game) and attempting to use ODK-X Sync Endpoints for data collection and synchronisation. I came across the REST APIs here. I wish to use them and I am able to test them out in Python, but am unable to figure out how to use the same when building an application using Application Designer. I have two questions->

(1) Is there a link to examples for using APIs within an application. Also, in building application using Application Designer, how to make a final product such that ODK-X Services/Tables apps are packaged with the application?

(2) Is there some other way to use ODK-X Sync Endpoint, for example, creating a regular android application in Java and then linking it ODK-X Services/Tables?

Thank you!

1 Like

Sync-client is a Java library that implements the rest protocol.
Repo: https://github.com/odk-x/sync-client

Suitcase uses Sync-client
Repo: https://github.com/odk-x/suitcase


Thank you so much for these suggestions, they are helpful. So, there is an option of using Sync-client to formalise using APIs. I could not find any documentation on Sync-client though, I guess I will read the code to use it.

I have another question-- in my understanding, if I have already set up tables on server, I do not need to install ODK-X Services separately since I can directly use the API to set up users and synchronize the data they enter with that on the server. Is this correct?

1 Like

ODK-X Services provides three services/capabilities as infrastructure to the other ODK-X mobile apps (e.g., Tables, Survey, Scan). These 3 services are 1) database service, 2) sync service, 3) web rendering of files.

Since these 3 services are central infrastructure to ODK-X mobile apps, it basically means you always have to ODK-X Services installed for functionality to work.

1 Like