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.
Phần này cung cấp thông tin tổng quan về các phương thức API Apps Script mà bạn có thể dùng để tạo một phiên bản mã dự án mới, đọc thông tin về phiên bản hoặc liệt kê tất cả các phiên bản hiện có.
Kết quả: Tạo một phiên bản mới, bất biến của mã dự án tập lệnh. Mã đã lưu hiện tại của dự án được dùng cho phiên bản này. Thao tác này sẽ tạo một "ảnh chụp nhanh" mã mà bạn có thể đọc sau hoặc sử dụng trong một hoạt động triển khai cụ thể. Trả về một đối tượng Version chứa thông tin chi tiết về cấu hình phiên bản.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-04 UTC."],[[["\u003cp\u003eThis section explains how to manage Apps Script project versions using the Apps Script API.\u003c/p\u003e\n"],["\u003cp\u003eYou can create new versions, which are immutable snapshots of your project's code.\u003c/p\u003e\n"],["\u003cp\u003eThe API allows you to list all existing versions and retrieve details about a specific version.\u003c/p\u003e\n"],["\u003cp\u003eVersion information is returned as \u003ccode\u003eVersion\u003c/code\u003e objects, and you can access the code itself using \u003ccode\u003eprojects.getContent\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["This section provides an overview of the Apps Script API methods you can use\nto create a new project code [version](/apps-script/guides/versions), read\nversion information, or list all existing versions.\n| **Note:** These methods return one or more [`Version`](/apps-script/api/reference/rest/v1/projects.versions#Version) objects which contain the version configuration information such as the version number and description. You can read the code attached to a specific version using a [`projects.getContent`](/apps-script/api/reference/rest/v1/projects/getContent) request.\n\n| **API method overview** ||\n|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Create a version** | [projects.versions.create](/apps-script/api/reference/rest/v1/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](/apps-script/concepts/deployments). Returns a [`Version`](/apps-script/api/reference/rest/v1/projects.versions#Version) object, containing the version configuration details. |\n| **List a project's versions** | [projects.versions.list](/apps-script/api/reference/rest/v1/projects.versions/list) **Results** : Returns an array of [`Version`](/apps-script/api/reference/rest/v1/projects.versions#Version) objects, each representing one of the versions of the script project. |\n| **Read a version** | [projects.versions.get](/apps-script/api/reference/rest/v1/projects.versions/get) **Results** : Returns a [`Version`](/apps-script/api/reference/rest/v1/projects.versions#Version) that represents a specific version of a script project. |"]]