REST Resource: projects.versions
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แหล่งข้อมูล: เวอร์ชัน
ทรัพยากรที่แสดงเวอร์ชันของโปรเจ็กต์สคริปต์ เวอร์ชันจะเป็น "สแนปชอต" ของโครงการสคริปต์ และคล้ายกับรุ่นย่อยแบบอ่านอย่างเดียว เมื่อสร้างการทำให้ใช้งานได้ คุณต้องระบุเวอร์ชันที่จะใช้
การแสดง JSON |
{
"scriptId": string,
"versionNumber": integer,
"description": string,
"createTime": string
} |
ช่อง |
scriptId |
string
รหัสไดรฟ์ของโปรเจ็กต์สคริปต์
|
versionNumber |
integer
รหัสที่เพิ่มขึ้นซึ่ง Apps Script สร้างขึ้นเมื่อสร้างเวอร์ชัน หมายเลขนี้เป็นหมายเลขที่ระบบกำหนดและจะเปลี่ยนแปลงไม่ได้เมื่อสร้างแล้ว
|
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. |"]]