Tetap teratur dengan koleksi Simpan dan kategorikan konten berdasarkan preferensi Anda.
Bagian ini memberikan ringkasan metode Apps Script API yang dapat Anda gunakan untuk membuat versi kode project baru, membaca informasi versi, atau mencantumkan semua versi yang ada.
Hasil: Membuat versi baru dan tidak dapat diubah dari kode project skrip. Kode tersimpan project saat ini digunakan untuk versi. Tindakan ini akan membuat "snapshot" kode yang dapat Anda baca nanti atau gunakan dalam deployment tertentu. Menampilkan objek Version yang berisi detail konfigurasi versi.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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,["# Managing Versions\n\nThis 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. |"]]