Projeleri Yönetme
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bu bölümde, Apps Komut Dosyası projelerinizi oluşturmak, okumak, değiştirmek ve izlemek için kullanabileceğiniz Apps Komut Dosyası API yöntemlerine genel bir bakış sunulmaktadır. Proje Yönetimi örnekleri sayfasında API yönetimi istekleriyle ilgili örnekler gösterilir. Her yöntemin referans belgelerinde uygulama ayrıntıları yer alır.
API yöntemine genel bakış |
Proje oluşturma |
projects.create
Sonuçlar: Proje dosyası içermeyen ve varsayılan proje manifestosu olan temel, boş bir proje oluşturun.
Seçenekler: Proje başlığı sağlayabilirsiniz. Ayrıca, komut dosyasının üst öğesi olarak kullanılacak bir Google Dokümanlar, Google E-Tablolar, Google Formlar veya Slaytlar dosyasının Google Drive kimliğini sağlayarak bağlı komut dosyası da oluşturabilirsiniz.
|
Proje meta verilerini okuma |
projects.get
Sonuçlar: Proje meta verilerini temsil eden bir
Project
nesnesini alır. Bu veriler arasında proje başlığı, komut dosyası kimliği, oluşturma kullanıcısı, oluşturma zamanı ve diğer ayrıntılar yer alır.
|
Proje içeriğini okuma |
projects.getContent
Sonuçlar: Projedeki her kod ve HTML dosyası için bir tane olmak üzere File nesnelerinden oluşan bir dizi döndürür. Liste, proje manifestini JSON dosyası olarak da içerir. Dosya nesneleri, dosyanın kaynak içeriğini (File.source ) ve dosyadaki işlevlerin listesi (File.functionSet ) gibi diğer meta verileri içerir.
Seçenekler: Sorgu parametresiyle içeriğin hangi sürümünün alınacağını belirtebilirsiniz.
|
Proje içeriğini güncelleme |
projects.updateContent
Sonuçlar: Senaryo projesindeki dosya içeriğini değiştirir.
Yeni içeriği File nesneleri dizisi olarak sağlarsınız. Bu File nesnelerinden biri JSON türünde olmalı ve komut dosyası projesinin yeni proje manifestosunu temsil etmelidir. Yeni içerik, projenin HEAD sürümü olarak saklanır. Komut dosyası tetikleyici olarak, komut dosyası düzenleyicide, eklenti önizleme modunda veya geliştirme modunda bir web uygulaması ya da Apps Komut Dosyası API'si olarak yürütüldüğünde kullanılır.
Not: Komut dosyası projesi içeriğini güncellerken yaygın uygulama, önce mevcut File dizisini almak için
projects.getContent
isteği göndermek, bu nesnelerde değişiklik yapmak ve ardından File 'leri
projects.updateContent isteği için giriş olarak kullanmaktır.
Uyarı: Yeni içerik, komut dosyası projesindeki tüm mevcut dosyaların yerini alır. İstekle güncellenmeyen dosyalar kaldırılır.
|
Proje metriklerini okuma |
projects.getMetrics
Sonuçlar: Bir projeyle ilgili belirli metrikleri okuma
Bu metrikler arasında kullanıcı sayısı, toplam çalıştırma sayısı, toplam yürütme hatası sayısı ve diğer ayrıntılar yer alır.
İstediğiniz bilgileri belirtmek için
MetricType
kullanın.
Seçenekler:
MetricsFilter kullanarak sonuçları belirli dağıtımlarla veya komut dosyası işlevleriyle kısıtlayın.
Ayrıca,
MetricsIntervalConfig kullanarak belirli bir metrik aralığı da tanımlayabilirsiniz.
|
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-31 UTC.
[null,null,["Son güncelleme tarihi: 2025-08-31 UTC."],[[["\u003cp\u003eThis section outlines Apps Script API methods for managing Apps Script projects, including creating, reading, updating, and monitoring.\u003c/p\u003e\n"],["\u003cp\u003eYou can create new projects, retrieve project metadata and content, and update project files using these methods.\u003c/p\u003e\n"],["\u003cp\u003eThe API allows you to access project metrics like user count, executions, and errors for analysis.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the provided links for detailed documentation and code samples on project management requests.\u003c/p\u003e\n"]]],[],null,["# Managing Projects\n\nThis section provides an overview of the Apps Script API methods\nyou can use to create, read, modify,\nand monitor your Apps Script projects. The\n[Project Management](/apps-script/api/samples/manage)\nsamples page shows examples of API management requests. The reference\ndocumentation for each method provides implementation details.\n\n| **API method overview** ||\n|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Create projects** | [projects.create](/apps-script/api/reference/rest/v1/projects/create) **Results** : Create a basic, empty project with no project files and a default [project manifest](/apps-script/concepts/manifests). **Options** : You can provide a project title. You can also create a [bound script](/apps-script/guides/bound) by providing the Google Drive ID of a Google Docs, Google Sheets, Google Forms, or Slides file to act as the script's parent. |\n| **Read project metadata** | [projects.get](/apps-script/api/reference/rest/v1/projects/get) **Results** : Retrieves a [`Project`](/apps-script/api/reference/rest/v1/projects#Project) object, which represents project metadata. This data includes the project title, script ID, creating user, creation time, and other details. |\n| **Read project content** | [projects.getContent](/apps-script/api/reference/rest/v1/projects/getContent) **Results** : Returns an array of [`File`](/apps-script/api/reference/rest/v1/File) objects, one for each code and HTML file in the project. The list also includes the [project manifest](/apps-script/concepts/manifests) as a JSON file. File objects contain the source content of the file (`File.source`) and other metadata, such a list of functions in the file (`File.functionSet`). **Options** : You can specify which [version](/apps-script/guides/versions) of the content to retrieve with a query parameter. |\n| **Update project content** | [projects.updateContent](/apps-script/api/reference/rest/v1/projects/updateContent) **Results** : Changes the file content in a script project. You provide the new content as an array of [`File`](/apps-script/api/reference/rest/v1/File) objects. One of these `File` objects must have JSON type and represent the script project's new [project manifest](/apps-script/concepts/manifests). The new content is stored as the HEAD version of the project. It is used when the script executes as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. **Note** : When updating script project content, common practice is to first issue a [projects.getContent](/apps-script/api/reference/rest/v1/projects/getContent) request to retrieve an array of the existing `File`s, make the desire to those objects, then use the `File`s as input for a [projects.updateContent](/apps-script/api/reference/rest/v1/projects/updateContent) request. **Warning:** The new content replaces all existing files in the script project. Files not updated by the request are removed. |\n| **Read project metrics** | [projects.getMetrics](/apps-script/api/reference/rest/v1/projects/getMetrics) **Results** : Read certain metrics about a project. These metrics include the number of users, the total number of executions, the total number of execution errors, and other details. Use a [MetricType](/apps-script/api/reference/rest/v1/projects/getMetrics#metrictype) to specify the information you are requesting. **Options** : Restrict the results to specific deployments or script functions using a [MetricsFilter](/apps-script/api/reference/rest/v1/projects/getMetrics#MetricsFilter). You can also define a specific metric interval using a [MetricsIntervalConfig](/api/reference/rest/v1/projects/getMetrics#metricsintervalconfig). |"]]