REST Resource: projects.versions
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
リソース: Version
スクリプト プロジェクト バージョンを表すリソース。バージョンは「スナップショット」スクリプト プロジェクトのもので、読み取り専用の分岐リリースに似ています。Deployment を作成するときに、使用するバージョンを指定する必要があります。
JSON 表現 |
{
"scriptId": string,
"versionNumber": integer,
"description": string,
"createTime": string
} |
フィールド |
scriptId |
string
スクリプト プロジェクトのドライブ ID。
|
versionNumber |
integer
バージョンの作成時に Apps Script によって作成される増分 ID。これはシステムによって割り当てられた番号であり、作成後に変更することはできません。
|
description |
string
このバージョンの説明。
|
createTime |
string (Timestamp format)
バージョンの作成日時。 RFC3339 UTC「Zulu」形式のタイムスタンプ。精度はナノ秒まで、小数点以下は最大 9 桁。例: "2014-10-02T15:01:23Z" 、"2014-10-02T15:01:23.045123456Z" 。
|
メソッド |
|
現在のコードを使用して、一意のバージョン番号を持つ新しい不変バージョンを作成します。 |
|
スクリプト プロジェクトのバージョンを取得します。 |
|
スクリプト プロジェクトのバージョンを一覧表示します。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eA Version represents a read-only snapshot of a script project, similar to a branched release.\u003c/p\u003e\n"],["\u003cp\u003eIt's essential to specify the desired Version when creating Deployments.\u003c/p\u003e\n"],["\u003cp\u003eVersions have a unique ID, description, creation timestamp, and are linked to a specific script project.\u003c/p\u003e\n"],["\u003cp\u003eYou can create, retrieve, and list Versions through the provided methods.\u003c/p\u003e\n"]]],[],null,["# REST Resource: projects.versions\n\n- [Resource: Version](#Version)\n - [JSON representation](#Version.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Version\n-----------------\n\nA resource representing a script project version. A version is a \"snapshot\" of a script project and is similar to a read-only branched release. When creating deployments, the version to use must be specified.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------|\n| ``` { \"scriptId\": string, \"versionNumber\": integer, \"description\": string, \"createTime\": string } ``` |\n\n| Fields ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `scriptId` | `string` The script project's Drive ID. |\n| `versionNumber` | `integer` The incremental ID that is created by Apps Script when a version is created. This is system assigned number and is immutable once created. |\n| `description` | `string` The description for this version. |\n| `createTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` When the version was created. A timestamp in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. Examples: `\"2014-10-02T15:01:23Z\"` and `\"2014-10-02T15:01:23.045123456Z\"`. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| ### [create](/apps-script/api/reference/rest/v1/projects.versions/create) | Creates a new immutable version using the current code, with a unique version number. |\n| ### [get](/apps-script/api/reference/rest/v1/projects.versions/get) | Gets a version of a script project. |\n| ### [list](/apps-script/api/reference/rest/v1/projects.versions/list) | List the versions of a script project. |"]]