Count Revisions


  • You can get the number of revisions a document has by using the advance session method getCountFor.

  • In this page:


Get revisions count

// Get the number of revisions for document 'companies/1-A"
const revisionsCount = await session.advanced.revisions.getCountFor("companies/1-A");

Syntax

await session.advanced.revisions.getCountFor(id);
Parameter Type Description
id string Document ID for which revisions are counted
Return value
Promise A Promise resolving to the number of revisions for the specified document