Method: projects.versions.create Stay organized with collections Save and categorize content based on your preferences.
Page Summary
A new immutable version of a script project is created using a POST request to a specific URL.
The request requires a
scriptIdas a path parameter to identify the project.The request body is a JSON object containing optional fields like
versionNumber,description, andcreateTimefor the new version.A successful response returns a newly created Version object.
Authorization requires the
https://www.googleapis.com/auth/script.projectsOAuth scope.
Creates a new immutable version using the current code, with a unique version number.
HTTP request
POST https://script.googleapis.com/v1/projects/{scriptId}/versions
The URL usesgRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
scriptId |
The script project's Drive ID. |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{"versionNumber":integer,"description":string,"createTime":string} |
| Fields | |
|---|---|
versionNumber |
The incremental ID that is created by Apps Script when a version is created. This is system assigned number and is immutable once created. |
description |
The description for this version. |
createTime |
When the version was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
Response body
If successful, the response body contains a newly created instance ofVersion.
Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/script.projects
For more information, see theOAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.