api reference · v1

Every Apps Script method, from the index.

All 16 methods of the Apps Script API, rendered at build time from the committed Discovery index the grr binary embeds — the same data grr api describe reads at runtime. Flags are kebab-cased parameter names: userId is --user-id.

16 methods · v1 · revision 20260906

script.processes

2 methods

script.processes.list

GET

grr script processes list v1/processes

List information about processes made by or on behalf of a user, such as process type and current status.

Parameter Type Required Repeated Location Description Enum values
pageSize integer — — query The maximum number of returned processes per page of results. Defaults to 50. —
pageToken string — — query The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. —
userProcessFilter.deploymentId string — — query Optional field used to limit returned processes to those originating from projects with a specific deployment ID. —
userProcessFilter.endTime string — — query Optional field used to limit returned processes to those that completed on or before the given timestamp. —
userProcessFilter.functionName string — — query Optional field used to limit returned processes to those originating from a script function with the given function name. —
userProcessFilter.projectName string — — query Optional field used to limit returned processes to those originating from projects with project names containing a specific string. —
userProcessFilter.scriptId string — — query Optional field used to limit returned processes to those originating from projects with a specific script ID. —
userProcessFilter.startTime string — — query Optional field used to limit returned processes to those that were started on or after the given timestamp. —
userProcessFilter.statuses string — yes query Optional field used to limit returned processes to those having one of the specified process statuses. PROCESS_STATUS_UNSPECIFIED · RUNNING · PAUSED · COMPLETED · CANCELED · FAILED · TIMED_OUT · UNKNOWN · DELAYED · EXECUTION_DISABLED
userProcessFilter.types string — yes query Optional field used to limit returned processes to those having one of the specified process types. PROCESS_TYPE_UNSPECIFIED · ADD_ON · EXECUTION_API · TIME_DRIVEN · TRIGGER · WEBAPP · EDITOR · SIMPLE_TRIGGER · MENU · BATCH_TASK
userProcessFilter.userAccessLevels string — yes query Optional field used to limit returned processes to those having one of the specified user access levels. USER_ACCESS_LEVEL_UNSPECIFIED · NONE · READ · WRITE · OWNER

https://www.googleapis.com/auth/script.processes least privilege

1 scope
  • https://www.googleapis.com/auth/script.processes

grr script processes list
grr script processes list

script.processes.listScriptProcesses

GET

grr script processes listScriptProcesses v1/processes:listScriptProcesses

List information about a script's executed processes, such as process type and current status.

Parameter Type Required Repeated Location Description Enum values
pageSize integer — — query The maximum number of returned processes per page of results. Defaults to 50. —
pageToken string — — query The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. —
scriptId string — — query The script ID of the project whose processes are listed. —
scriptProcessFilter.deploymentId string — — query Optional field used to limit returned processes to those originating from projects with a specific deployment ID. —
scriptProcessFilter.endTime string — — query Optional field used to limit returned processes to those that completed on or before the given timestamp. —
scriptProcessFilter.functionName string — — query Optional field used to limit returned processes to those originating from a script function with the given function name. —
scriptProcessFilter.startTime string — — query Optional field used to limit returned processes to those that were started on or after the given timestamp. —
scriptProcessFilter.statuses string — yes query Optional field used to limit returned processes to those having one of the specified process statuses. PROCESS_STATUS_UNSPECIFIED · RUNNING · PAUSED · COMPLETED · CANCELED · FAILED · TIMED_OUT · UNKNOWN · DELAYED · EXECUTION_DISABLED
scriptProcessFilter.types string — yes query Optional field used to limit returned processes to those having one of the specified process types. PROCESS_TYPE_UNSPECIFIED · ADD_ON · EXECUTION_API · TIME_DRIVEN · TRIGGER · WEBAPP · EDITOR · SIMPLE_TRIGGER · MENU · BATCH_TASK
scriptProcessFilter.userAccessLevels string — yes query Optional field used to limit returned processes to those having one of the specified user access levels. USER_ACCESS_LEVEL_UNSPECIFIED · NONE · READ · WRITE · OWNER

https://www.googleapis.com/auth/script.processes least privilege

1 scope
  • https://www.googleapis.com/auth/script.processes

grr script processes listScriptProcesses
grr script processes listScriptProcesses

script.projects

5 methods

script.projects.create

POST

grr script projects create v1/projects

Creates a new, empty script project with no script files and a base manifest file.

No parameters.

https://www.googleapis.com/auth/script.projects least privilege

1 scope
  • https://www.googleapis.com/auth/script.projects

grr script projects create
grr script projects create --body-file ./body.json

script.projects.get

GET

grr script projects get v1/projects/{scriptId}

Gets a script project's metadata.

Parameter Type Required Repeated Location Description Enum values
scriptId string yes — path The script project's Drive ID. —

https://www.googleapis.com/auth/script.projects.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/script.projects
  • https://www.googleapis.com/auth/script.projects.readonly

grr script projects get
grr script projects get --script-id <script-id>

script.projects.getContent

GET

grr script projects getContent v1/projects/{scriptId}/content

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

Parameter Type Required Repeated Location Description Enum values
scriptId string yes — path The script project's Drive ID. —
versionNumber integer — — query The version number of the project to retrieve. If not provided, the project's HEAD version is returned. —

https://www.googleapis.com/auth/script.projects.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/script.projects
  • https://www.googleapis.com/auth/script.projects.readonly

grr script projects getContent
grr script projects getContent --script-id <script-id>

script.projects.getMetrics

GET

grr script projects getMetrics v1/projects/{scriptId}/metrics

Get metrics data for scripts, such as number of executions and active users.

Parameter Type Required Repeated Location Description Enum values
metricsFilter.deploymentId string — — query Optional field indicating a specific deployment to retrieve metrics from. —
metricsGranularity string — — query Required field indicating what granularity of metrics are returned. UNSPECIFIED_GRANULARITY · WEEKLY · DAILY
scriptId string yes — path Required field indicating the script to get metrics for. —

https://www.googleapis.com/auth/script.metrics least privilege

1 scope
  • https://www.googleapis.com/auth/script.metrics

grr script projects getMetrics
grr script projects getMetrics --script-id <script-id>

script.projects.updateContent

PUT

grr script projects updateContent v1/projects/{scriptId}/content

Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the proje

Parameter Type Required Repeated Location Description Enum values
scriptId string yes — path The script project's Drive ID. —

https://www.googleapis.com/auth/script.projects least privilege

1 scope
  • https://www.googleapis.com/auth/script.projects

grr script projects updateContent
grr script projects updateContent --script-id <script-id> --body-file ./body.json

script.projects.deployments

5 methods

script.projects.deployments.create

POST

grr script projects deployments create v1/projects/{scriptId}/deployments

Creates a deployment of an Apps Script project.

Parameter Type Required Repeated Location Description Enum values
scriptId string yes — path The script project's Drive ID. —

https://www.googleapis.com/auth/script.deployments least privilege

1 scope
  • https://www.googleapis.com/auth/script.deployments

grr script projects deployments create
grr script projects deployments create --script-id <script-id> --body-file ./body.json

script.projects.deployments.delete

DELETE

grr script projects deployments delete v1/projects/{scriptId}/deployments/{deploymentId}

Deletes a deployment of an Apps Script project.

Parameter Type Required Repeated Location Description Enum values
deploymentId string yes — path The deployment ID to be undeployed. —
scriptId string yes — path The script project's Drive ID. —

https://www.googleapis.com/auth/script.deployments least privilege

1 scope
  • https://www.googleapis.com/auth/script.deployments

grr script projects deployments delete
grr script projects deployments delete --deployment-id <deployment-id> --script-id <script-id>

script.projects.deployments.get

GET

grr script projects deployments get v1/projects/{scriptId}/deployments/{deploymentId}

Gets a deployment of an Apps Script project.

Parameter Type Required Repeated Location Description Enum values
deploymentId string yes — path The deployment ID. —
scriptId string yes — path The script project's Drive ID. —

https://www.googleapis.com/auth/script.deployments.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/script.deployments
  • https://www.googleapis.com/auth/script.deployments.readonly

grr script projects deployments get
grr script projects deployments get --deployment-id <deployment-id> --script-id <script-id>

script.projects.deployments.list

GET

grr script projects deployments list v1/projects/{scriptId}/deployments

Lists the deployments of an Apps Script project.

Parameter Type Required Repeated Location Description Enum values
pageSize integer — — query The maximum number of deployments on each returned page. Defaults to 50. —
pageToken string — — query The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. —
scriptId string yes — path The script project's Drive ID. —

https://www.googleapis.com/auth/script.deployments.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/script.deployments
  • https://www.googleapis.com/auth/script.deployments.readonly

grr script projects deployments list
grr script projects deployments list --script-id <script-id>

script.projects.deployments.update

PUT

grr script projects deployments update v1/projects/{scriptId}/deployments/{deploymentId}

Updates a deployment of an Apps Script project.

Parameter Type Required Repeated Location Description Enum values
deploymentId string yes — path The deployment ID for this deployment. —
scriptId string yes — path The script project's Drive ID. —

https://www.googleapis.com/auth/script.deployments least privilege

1 scope
  • https://www.googleapis.com/auth/script.deployments

grr script projects deployments update
grr script projects deployments update --deployment-id <deployment-id> --script-id <script-id> --body-file ./body.json

script.projects.versions

3 methods

script.projects.versions.create

POST

grr script projects versions create v1/projects/{scriptId}/versions

Creates a new immutable version using the current code, with a unique version number.

Parameter Type Required Repeated Location Description Enum values
scriptId string yes — path The script project's Drive ID. —

https://www.googleapis.com/auth/script.projects least privilege

1 scope
  • https://www.googleapis.com/auth/script.projects

grr script projects versions create
grr script projects versions create --script-id <script-id> --body-file ./body.json

script.projects.versions.get

GET

grr script projects versions get v1/projects/{scriptId}/versions/{versionNumber}

Gets a version of a script project.

Parameter Type Required Repeated Location Description Enum values
scriptId string yes — path The script project's Drive ID. —
versionNumber integer yes — path The version number. —

https://www.googleapis.com/auth/script.projects.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/script.projects
  • https://www.googleapis.com/auth/script.projects.readonly

grr script projects versions get
grr script projects versions get --script-id <script-id> --version-number <version-number>

script.projects.versions.list

GET

grr script projects versions list v1/projects/{scriptId}/versions

List the versions of a script project.

Parameter Type Required Repeated Location Description Enum values
pageSize integer — — query The maximum number of versions on each returned page. Defaults to 50. —
pageToken string — — query The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. —
scriptId string yes — path The script project's Drive ID. —

https://www.googleapis.com/auth/script.projects.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/script.projects
  • https://www.googleapis.com/auth/script.projects.readonly

grr script projects versions list
grr script projects versions list --script-id <script-id>

script.scripts

1 method

script.scripts.run

POST

grr script scripts run v1/scripts/{scriptId}:run

Parameter Type Required Repeated Location Description Enum values
scriptId string yes — path The script ID of the script to be executed. Find the script ID on the **Project settings** page under "IDs." As multiple executable APIs can be deployed in new —

https://www.googleapis.com/auth/userinfo.email least privilege

12 scopes
  • https://mail.google.com/
  • https://www.google.com/calendar/feeds
  • https://www.google.com/m8/feeds
  • https://www.googleapis.com/auth/admin.directory.group
  • https://www.googleapis.com/auth/admin.directory.user
  • https://www.googleapis.com/auth/documents
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/forms
  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/groups
  • https://www.googleapis.com/auth/spreadsheets
  • https://www.googleapis.com/auth/userinfo.email

grr script scripts run
grr script scripts run --script-id <script-id> --body-file ./body.json