Lock files via the Google Drive API to prevent content edits
You can now add and remove content restrictions via the Drive API. By using the new ContentRestriction API, any file type in Drive can be “locked,” preventing changes to the item’s content, title, and comments.
Content restrictions can be added or removed via the API and removed via Google Drive on the web by any user who has at least editor access level for the item.
Learn more about the new API functions in this Drive ContentRestriction (Locking) API documentation.
Admins, end users, and developers
Why you’d use it
While Google Drive’s collaborative editing and commenting features are often helpful and beneficial, sometimes it’s important to know that changes are not being made to a document. Locking a file with the ContentRestriction API can help accomplish this, and could be used to:
- Lock authoritative versions of documents to create “official” or “final” documents for record keeping.
- Prevent changes to documents that are involved in a workflow, automation, or business process.
- Freezing activity on a document for a period of reviews or audits.
- Admins and developers: Admins and developers with editor content access level and up and can use the API. See the Google Drive API documentation and our getting started guide (with examples) to learn more.
- End users: End users with editor content access level and up and can use the API. See the Google Drive API documentation and our getting started guide (with examples) to learn more.
- This feature is available now for all users.
- Available to all customers
- This feature was listed as an upcoming release.
Related Google News:
- Updated guidance to improve your app quality and discovery on Google Play April 29, 2021
- Trash to treasure: How Google thinks about deconstruction April 29, 2021
- Five ways we’re making Google the safer way to search April 29, 2021
- How we fought Search spam on Google in 2020 April 29, 2021
- Google’s research & data insights solution makes next-generation research accessible April 28, 2021
- Google Translate: One billion installs, one billion stories April 28, 2021
- Agent installation options for Google Cloud VMs April 28, 2021
- Creating safer cloud journeys with new security features and guidance for Google Cloud and Workspace April 28, 2021