Managing Versions

  • This section describes Apps Script API methods for managing script project versions.

  • You can use methods to create, list, and read project code versions.

  • API methods return Version objects containing configuration details like version number and description.

  • To read the code of a specific version, use a projects.getContent request.

This section provides an overview of the Apps Script API methods you can use to create a new project code version, read version information, or list all existing versions.

API method overview
Create a version

projects.versions.create

Results: Create a new, immutable version of a script project's code. The project's current saved code is used for the version. This creates a code "snapshot" you can read later or use in a specific deployment. Returns a Version object, containing the version configuration details.

List a project's versions

projects.versions.list

Results: Returns an array of Version objects, each representing one of the versions of the script project.

Read a version

projects.versions.get

Results: Returns a Version that represents a specific version of a script project.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月13日 UTC.