Hello. I want to try downloading by REST API reference - Grist Help Center. when doc is changed. Is it possible to somehow track/compare the version .grist files in Grist-server and on remote server by API? And use downloadDoc endpoint when version is different.
Hmm. There are two undocumented endpoints:
Both will give output that changes as the document changes. If you don’t have snapshots set up, the
/snapshots endpoint won’t give a lot of information, but it will give a timestamp. The
/states endpoint lists hashes and ids of changes made to the document. Different versions of the document could be compared somewhat with this information. Not sure exactly what you need.
Here are example endpoints for a template document:
/snapshots will look a lot emptier if the feature is not set up, but it will have a
Thank you, this is a very interesting opportunity. /states takes into account all changes since the beginning of the document creation? Well, this information can be obtained from the metadata of the saved file .grist?
The length of
/states will eventually be truncated for a long lived document or a document with very big changes:
The information shown in
/states can indeed be obtained from the
.grist file, it is in the
Here the task is to compare the current version. grist file with the document version, so I think the number of /states is not particularly important. One of the use cases, I think, is the offline operation of a mobile application (I’m just starting to experiment with this).