For any API endpoint generated from a single document in eXist, you can use the eXist document last modified and document etag methods. For any API endpoint generated based on the collection, use the time from the most recently modified document in the collection (similar should work for a filter or search result).
For any API endpoint generated from a single document in eXist, you can use the eXist document last modified and document etag methods. For any API endpoint generated based on the collection, use the time from the most recently modified document in the collection (similar should work for a filter or search result).