9

I'm reading through the v4 API and can't satisfy my own question. I want to build an app that gathers a single spreadsheet's previous revision(s). (Specifically, I want to be able to get the entire content of a previous revision.) Is this possible in the v4 API? If it is can I get entire revision snapshots, or does the API only return difference information?

yamori
  • 1,213
  • 4
  • 14
  • 27

1 Answers1

10

I cannot find any instruction in the Sheets API that can get the revision content of it's file. So the only way to get the revision file is by manually checking it in the Spreadsheet file itself under File -> See revison history. Or by using the Manage Revisions of Google Drive.

Google Drive keeps track of all changes made to a file by automatically creating a "revision history." This allows users to see who made edits and to revert to earlier versions of the same file.

Here are the steps that you need to do in order to get the revision file.

  1. Get the File ID of the Spreadsheet that you want to get its revision.

  2. By using the Revisions: list, you can get here the list of all revision that you do for that file.

  3. Now, by using the Revisions: get, you can now get the specific revision of the file.

For more information, check this SO question.

Community
  • 1
  • 1
KENdi
  • 7,576
  • 2
  • 16
  • 31
  • 5
    "Revisions for Google Docs, Sheets, and Slides can not be downloaded." https://developers.google.com/drive/api/v3/manage-revisions :( Any other way to see a diff in automated way? – ReDetection Feb 05 '19 at 01:57