Integrate odk-x sync endpoint with another service on data submission

Hello, I would like to call an external end-point when a new row is synchronized to my sync end-point to run an analysis on the submitted data and enter the results into a new table row.

Is this supported, and please point me to any documentation that can help me achieve this

If not is it possible to setup another service to monitor the data upload submissions for new data and do this?

Here is a link to the server API documentation which you can use to detect new rows and other changes.

https://docs.odk-x.org/odk-2-sync-protocol/

At this point I do not believe we have a trigger mechanism built, it is only pull.

@clarice_larson and additional advice?

1 Like

I agree that pulling data would be the best way to do it. You may want to take a look at the Get All Data Changes Since API. This allows you to see all the rows that have changed in a table since a specified data_etag. If you keep track of the data_etag from your last pull, you would be able to get all the changes that have occurred after this data_etag. The changes include insertions, deletions, and modifications so you would have to do some additional work to check for new ids.

1 Like

Thank you, let me try this and get back to you

1 Like