Method: projects.getContent  |  Apps Script  |  Google for Developers (original) (raw)

Method: projects.getContent

Stay organized with collections Save and categorize content based on your preferences.

Gets the content of the script project, including the code source and metadata for each script file.

HTTP request

GET https://script.googleapis.com/v1/projects/{scriptId}/content

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
scriptId string The script project's Drive ID.

Query parameters

Parameters
versionNumber integer The version number of the project to retrieve. If not provided, the project's HEAD version is returned.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

The Content resource.

JSON representation
{ "scriptId": string, "files": [ { object (File) } ] }
Fields
scriptId string The script project's Drive ID.
files[] object (File) The list of script project files. One of the files is a script manifest; it must be named "appsscript", must have type of JSON, and include the manifest configurations for the project.

Requires one of the following OAuth scopes:

For more information, see the OAuth 2.0 Overview.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-31 UTC.