REST Resource: projects.versions
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài nguyên: Phiên bản
Tài nguyên đại diện cho phiên bản dự án tập lệnh. Phiên bản là "ảnh chụp nhanh" của dự án tập lệnh và tương tự như bản phát hành phân nhánh chỉ đọc. Khi tạo các đợt triển khai, bạn phải chỉ định phiên bản sẽ sử dụng.
Biểu diễn dưới dạng JSON |
{
"scriptId": string,
"versionNumber": integer,
"description": string,
"createTime": string
} |
Trường |
scriptId |
string
Mã Drive của dự án tập lệnh.
|
versionNumber |
integer
Mã nhận dạng gia tăng do Apps Script tạo khi tạo phiên bản. Đây là số do hệ thống chỉ định và không thể thay đổi sau khi được tạo.
|
description |
string
Nội dung mô tả phiên bản này.
|
createTime |
string (Timestamp format)
Thời điểm tạo phiên bản. Dấu thời gian theo múi giờ "Zulu" RFC3339 (giờ UTC) với độ phân giải nano giây và lên đến 9 chữ số phân số. Ví dụ: "2014-10-02T15:01:23Z" và "2014-10-02T15:01:23.045123456Z" .
|
Phương thức |
|
Tạo một phiên bản không thể thay đổi mới bằng mã hiện tại, kèm theo số phiên bản duy nhất. |
|
Lấy phiên bản của dự án tập lệnh. |
|
Liệt kê các phiên bản của một dự án tập lệnh. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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. |"]]