Stay organized with collections
Save and categorize content based on your preferences.
This section provides an overview of the Apps Script API methods
you can use to create, read, modify,
and monitor your Apps Script projects. The
Project Management
samples page shows examples of API management requests. The reference
documentation for each method provides implementation details.
Results: Create a basic, empty project with no project
files and a default
project manifest.
Options: You can provide a project title. You can also
create a bound script by
providing the Google Drive ID of a Google Docs, Google Sheets, Google Forms, or Slides
file to act as the script's parent.
Results: Retrieves a
Project
object, which represents project metadata. This data includes the
project title, script ID, creating user, creation time, and other
details.
Results: Returns an array of
File
objects, one for each code and HTML file in the project. The list also
includes the project manifest
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 of the content to
retrieve with a query parameter.
Results: Changes the file content in a script project.
You provide the new content as an array of
File
objects. One of these File objects must have JSON type
and represent the script project's new
project manifest. 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
request to retrieve an array of the existing Files,
make the desire to those objects, then use the Files as
input for a
projects.updateContent request.
Warning: The new content replaces all
existing files in the script project. Files not updated by the request
are removed.
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
to specify the information you are requesting.
Options: Restrict the results to specific deployments
or script functions using a
MetricsFilter.
You can also define a specific metric interval using a
MetricsIntervalConfig.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-06 UTC."],[[["This section outlines Apps Script API methods for managing Apps Script projects, including creating, reading, updating, and monitoring."],["You can create new projects, retrieve project metadata and content, and update project files using these methods."],["The API allows you to access project metrics like user count, executions, and errors for analysis."],["Refer to the provided links for detailed documentation and code samples on project management requests."]]],[]]