
To publish a Google Docs, Sheets, and Slides revision, you set the published property for that file in the Revisions property. However, series of numbers may have gaps if revisions are deleted, so you should not rely on sequential numbers when you retrieve revisions. Google Docs, Drawings, and Slides revisions auto-increment the revision numbers. You can also export the revision in one of the supported formats by checking the Short-lived URL when you request the revision - don't rely on it for later use. Note: If you're using the older Drive API v2, you need to send an authorized Revisions for Google Docs, Sheets, and Slides can't be downloaded. Revisions.get method with the parameter alt=media. To download the revision content, you need to call Check theĬapabilities.canReadRevisions field on the file prior to Note: Access to historical revisions is restricted based on role. To download the data for all previous revisions of the file that are still stored in cloud, you can call revisions.list, which gets all the revisionIds.

This fetches the revision that corresponds to the metadata of the file you previously retrieved.

You can use the value of the headRevisionId field from the Files resource to download the latest revision. To prevent this from happening, you can set the boolean flag keepRevisionForever to true to mark revisions that you don't want Drive to purge. Google Drive automatically deletes older revisions that are no longer of interest to the user. Specify revisions to save from auto delete For more details about revision terminology, see Changes and revisions overview.

Google Drive API provides the Revisions resource so that you can download and publish file revisions.
