Mantieni tutto organizzato con le raccolte Salva e classifica i contenuti in base alle tue preferenze.
Questa sezione fornisce una panoramica dei metodi dell'API Apps Script che puoi utilizzare per creare una nuova versione del codice del progetto, leggere le informazioni sulla versione o elencare tutte le versioni esistenti.
Risultati: crea una nuova versione immutabile del codice di un progetto di script. Per la versione viene utilizzato il codice salvato attualmente nel progetto. In questo modo viene creato uno "snapshot" del codice che puoi leggere in un secondo momento o utilizzare in uno deployment specifico. Restituisce un oggetto Version contenente i dettagli di configurazione della versione.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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. |"]]