Apps Script API
Stay organized with collections
Save and categorize content based on your preferences.
Manages and executes Google Apps Script projects.
Service: script.googleapis.com
To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.
Discovery document
A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:
Service endpoint
A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:
https://script.googleapis.com
Methods |
list |
GET /v1/processes
List information about processes made by or on behalf of a user, such as process type and current status. |
listScriptProcesses |
GET /v1/processes:listScriptProcesses
List information about a script's executed processes, such as process type and current status. |
Methods |
create |
POST /v1/projects
Creates a new, empty script project with no script files and a base manifest file. |
get |
GET /v1/projects/{scriptId}
Gets a script project's metadata. |
getContent |
GET /v1/projects/{scriptId}/content
Gets the content of the script project, including the code source and metadata for each script file. |
getMetrics |
GET /v1/projects/{scriptId}/metrics
Get metrics data for scripts, such as number of executions and active users. |
updateContent |
PUT /v1/projects/{scriptId}/content
Updates the content of the specified script project. |
Methods |
create |
POST /v1/projects/{scriptId}/deployments
Creates a deployment of an Apps Script project. |
delete |
DELETE /v1/projects/{scriptId}/deployments/{deploymentId}
Deletes a deployment of an Apps Script project. |
get |
GET /v1/projects/{scriptId}/deployments/{deploymentId}
Gets a deployment of an Apps Script project. |
list |
GET /v1/projects/{scriptId}/deployments
Lists the deployments of an Apps Script project. |
update |
PUT /v1/projects/{deploymentConfig.scriptId}/deployments/{deploymentId}
Updates a deployment of an Apps Script project. |
Methods |
create |
POST /v1/projects/{scriptId}/versions
Creates a new immutable version using the current code, with a unique version number. |
get |
GET /v1/projects/{scriptId}/versions/{versionNumber}
Gets a version of a script project. |
list |
GET /v1/projects/{scriptId}/versions
List the versions of a script project. |
Methods |
run |
POST /v1/scripts/{scriptId}:run
Runs a function in an Apps Script project. |
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.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003eThe Apps Script API manages and executes Google Apps Script projects, providing functionality for creating, deploying, and running scripts.\u003c/p\u003e\n"],["\u003cp\u003eIt offers REST resources for managing projects, deployments, versions, processes, and scripts themselves, allowing programmatic control over various aspects of Apps Script projects.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage the API using Google-provided client libraries or their own libraries by adhering to the provided discovery document and service endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe API enables functionalities such as retrieving project metadata, updating script content, listing deployments, running script functions, and managing versions.\u003c/p\u003e\n"],["\u003cp\u003eUsers can manage and execute Google Apps Scripts projects.\u003c/p\u003e\n"]]],[],null,["# Apps Script API\n\nManages and executes Google Apps Script projects.\n\n- [REST Resource: v1.processes](#v1.processes)\n- [REST Resource: v1.projects](#v1.projects)\n- [REST Resource: v1.projects.deployments](#v1.projects.deployments)\n- [REST Resource: v1.projects.versions](#v1.projects.versions)\n- [REST Resource: v1.scripts](#v1.scripts)\n\nService: script.googleapis.com\n------------------------------\n\nTo call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.\n\n### Discovery document\n\nA [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:\n\n- \u003chttps://script.googleapis.com/$discovery/rest?version=v1\u003e\n\n### Service endpoint\n\nA [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:\n\n- `https://script.googleapis.com`\n\nREST Resource: [v1.processes](/apps-script/api/reference/rest/v1/processes)\n---------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [list](/apps-script/api/reference/rest/v1/processes/list) | `GET /v1/processes` List information about processes made by or on behalf of a user, such as process type and current status. |\n| [listScriptProcesses](/apps-script/api/reference/rest/v1/processes/listScriptProcesses) | `GET /v1/processes:listScriptProcesses` List information about a script's executed processes, such as process type and current status. |\n\nREST Resource: [v1.projects](/apps-script/api/reference/rest/v1/projects)\n-------------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| [create](/apps-script/api/reference/rest/v1/projects/create) | `POST /v1/projects` Creates a new, empty script project with no script files and a base manifest file. |\n| [get](/apps-script/api/reference/rest/v1/projects/get) | `GET /v1/projects/{scriptId}` Gets a script project's metadata. |\n| [getContent](/apps-script/api/reference/rest/v1/projects/getContent) | `GET /v1/projects/{scriptId}/content` Gets the content of the script project, including the code source and metadata for each script file. |\n| [getMetrics](/apps-script/api/reference/rest/v1/projects/getMetrics) | `GET /v1/projects/{scriptId}/metrics` Get metrics data for scripts, such as number of executions and active users. |\n| [updateContent](/apps-script/api/reference/rest/v1/projects/updateContent) | `PUT /v1/projects/{scriptId}/content` Updates the content of the specified script project. |\n\nREST Resource: [v1.projects.deployments](/apps-script/api/reference/rest/v1/projects.deployments)\n-------------------------------------------------------------------------------------------------\n\n| Methods ||\n|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| [create](/apps-script/api/reference/rest/v1/projects.deployments/create) | `POST /v1/projects/{scriptId}/deployments` Creates a deployment of an Apps Script project. |\n| [delete](/apps-script/api/reference/rest/v1/projects.deployments/delete) | `DELETE /v1/projects/{scriptId}/deployments/{deploymentId}` Deletes a deployment of an Apps Script project. |\n| [get](/apps-script/api/reference/rest/v1/projects.deployments/get) | `GET /v1/projects/{scriptId}/deployments/{deploymentId}` Gets a deployment of an Apps Script project. |\n| [list](/apps-script/api/reference/rest/v1/projects.deployments/list) | `GET /v1/projects/{scriptId}/deployments` Lists the deployments of an Apps Script project. |\n| [update](/apps-script/api/reference/rest/v1/projects.deployments/update) | `PUT /v1/projects/{deploymentConfig.scriptId}/deployments/{deploymentId}` Updates a deployment of an Apps Script project. |\n\nREST Resource: [v1.projects.versions](/apps-script/api/reference/rest/v1/projects.versions)\n-------------------------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [create](/apps-script/api/reference/rest/v1/projects.versions/create) | `POST /v1/projects/{scriptId}/versions` Creates a new immutable version using the current code, with a unique version number. |\n| [get](/apps-script/api/reference/rest/v1/projects.versions/get) | `GET /v1/projects/{scriptId}/versions/{versionNumber}` Gets a version of a script project. |\n| [list](/apps-script/api/reference/rest/v1/projects.versions/list) | `GET /v1/projects/{scriptId}/versions` List the versions of a script project. |\n\nREST Resource: [v1.scripts](/apps-script/api/reference/rest/v1/scripts)\n-----------------------------------------------------------------------\n\n| Methods ||\n|-------------------------------------------------------|------------------------------------------------------------------------------|\n| [run](/apps-script/api/reference/rest/v1/scripts/run) | `POST /v1/scripts/{scriptId}:run` Runs a function in an Apps Script project. |"]]