AI-generated Key Takeaways
-
This method gets the content of a script project, including the code source and metadata for each script file.
-
The HTTP request uses a GET method with the URL
https://script.googleapis.com/v1/projects/{scriptId}/content. -
The
scriptIdis a required path parameter, representing the script project's Drive ID. -
An optional query parameter
versionNumbercan be used to retrieve a specific version of the project. -
The response body, if successful, contains the script project's Drive ID and a list of script project files.
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization Scopes
- Try it!
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 |
The script project's Drive ID. |
Query parameters
| Parameters | |
|---|---|
versionNumber |
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 ( |
| Fields | |
|---|---|
scriptId |
The script project's Drive ID. |
files[] |
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. |
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/script.projectshttps://www.googleapis.com/auth/script.projects.readonly
For more information, see the OAuth 2.0 Overview.