I looking to use the API (/api/v2/assets/) to regularly get the latest data. Ideally, I would also get a history of changes to the data, but I have not figured out a way to get previous (changed) submissions via the API.
I am using /api/v2/assets/{asset_uid}/data/
to get the latest data. I want to get only data that is new or changed since my last pull of data. I first tried to query by _submission_time, but it seems like this is not updated on edit. I found that I can use meta/deprecatedID to get any submissions that have been edited.
/api/v2/assets/{asset_uid}/data/?query={"meta/deprecatedID": {"$exists": true}}
I can store the key:value (submission id : meta/deprecatedID) in order to determine which submissions changed.
I thought I might be able to use the meta/deprecatedID to trace the history of submissions. ?query={"_uuid": "7c4f3d6e-c306-40a5-8579-5ccdc27f2bfb"}
But this does not work for getting deprecated uuids. Once an edit occurs, and a new uuid is created, the API will not pull the previous version.
Is there a way to get the history/past versions of a submission via the API? Maybe some magic query parameter?
Thanks!
Matt