Grist Octri Preview
GET/docs/{docId}/compare/{docId2}

Compare two documents

Compare this document with another document. Useful for comparing a fork with its trunk document.

4 parameters
docIdstringrequired
A string id (UUID)
docId2stringrequired
ID of the document to compare with
detailbooleanoptional
If true, include detailed change information
maxRowsintegeroptional
Maximum number of row changes to include

2 status codes
200Comparison result
detailsobjectoptional
Detailed change information (when requested)
leftobjectrequired
Left/local document state
parentobjectrequired
Most recent common ancestor state
rightobjectrequired
Right/remote document state
summarystringrequired
Relationship summary: - same: documents have the same most recent state - left: the left document has actions not yet in the right - right: the right document has actions not yet in the left - both: both documents have changes (possible divergence) - unrelated: no common history found
Allowed:sameleftrightbothunrelated
403Insufficient access to compare documents

Error handling

A 403 is returned: Insufficient access to compare documents.