Google

Apps Script API

Manages and executes Google Apps Script projects.

Productivity & workspace#openapi#analytics#media

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Manages and executes Google Apps Script projects.

Endpoints 16

processes

  • GETList information about processes made by or on behalf of a user, such as process type and current status./v1/processes?pageSize=0&pageToken=string&userProcessFilter.deploymentId=string&userProcessFilter.endTime=string&userProcessFilter.functionName=string&userProcessFilter.projectName=string&userProcessFilter.scriptId=string&userProcessFilter.startTime=string&userProcessFilter.statuses=PROCESS_STATUS_UNSPECIFIED&userProcessFilter.types=PROCESS_TYPE_UNSPECIFIED&userProcessFilter.userAccessLevels=USER_ACCESS_LEVEL_UNSPECIFIEDList information about processes made by or on behalf of a user, such as process type and current status.
  • GETList information about a script's executed processes, such as process type and current status./v1/processes:listScriptProcesses?pageSize=0&pageToken=string&scriptId=string&scriptProcessFilter.deploymentId=string&scriptProcessFilter.endTime=string&scriptProcessFilter.functionName=string&scriptProcessFilter.startTime=string&scriptProcessFilter.statuses=PROCESS_STATUS_UNSPECIFIED&scriptProcessFilter.types=PROCESS_TYPE_UNSPECIFIED&scriptProcessFilter.userAccessLevels=USER_ACCESS_LEVEL_UNSPECIFIEDList information about a script's executed processes, such as process type and current status.

projects

  • POSTCreates a new, empty script project with no script files and a base manifest file./v1/projectsCreates a new, empty script project with no script files and a base manifest file.
  • GETGets a script project's metadata./v1/projects/:scriptIdGets a script project's metadata.
  • GETGets the content of the script project, including the code source and metadata for each script file./v1/projects/:scriptId/content?versionNumber=0Gets the content of the script project, including the code source and metadata for each script file.
  • PUTUpdates the content of the specified script project/v1/projects/:scriptId/contentUpdates 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…
  • GETGet metrics data for scripts, such as number of executions and active users./v1/projects/:scriptId/metrics?metricsFilter.deploymentId=string&metricsGranularity=UNSPECIFIED_GRANULARITYGet metrics data for scripts, such as number of executions and active users.

projects.deployments

  • GETLists the deployments of an Apps Script project./v1/projects/:scriptId/deployments?pageSize=0&pageToken=stringLists the deployments of an Apps Script project.
  • POSTCreates a deployment of an Apps Script project./v1/projects/:scriptId/deploymentsCreates a deployment of an Apps Script project.
  • GETGets a deployment of an Apps Script project./v1/projects/:scriptId/deployments/:deploymentIdGets a deployment of an Apps Script project.
  • PUTUpdates a deployment of an Apps Script project./v1/projects/:scriptId/deployments/:deploymentIdUpdates a deployment of an Apps Script project.
  • DELETEDeletes a deployment of an Apps Script project./v1/projects/:scriptId/deployments/:deploymentIdDeletes a deployment of an Apps Script project.

projects.versions

  • GETList the versions of a script project./v1/projects/:scriptId/versions?pageSize=0&pageToken=stringList the versions of a script project.
  • POSTCreates a new immutable version using the current code, with a unique version number./v1/projects/:scriptId/versionsCreates a new immutable version using the current code, with a unique version number.
  • GETGets a version of a script project./v1/projects/:scriptId/versions/:versionNumberGets a version of a script project.

scripts

  • POSTscript.scripts.run/v1/scripts/:scriptId:run

API details

Base URL
https://script.googleapis.com
Authentication
OAuth 2.0 (authorization code flow) with 18 scopes
An API key in the key query parameter
Operations
16 operations on 11 pathsGET 9POST 4PUT 2DELETE 1
Main resources
projects 5projects.deployments 5projects.versions 3processes 2scripts 1
Response formats
application/json
Description format
Google API Discovery, API version v1

How to test the Apps Script API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Apps Script API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 18 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “List information about processes made by or on behalf of a user, such as process type and current status.” (GET /v1/processes?pageSize=0&pageToken=string&userProcessFilter.deploymentId=string&userProcessFilter.endTime=string&userProcessFilter.functionName=string&userProcessFilter.projectName=string&userProcessFilter.scriptId=string&userProcessFilter.startTime=string&userProcessFilter.statuses=PROCESS_STATUS_UNSPECIFIED&userProcessFilter.types=PROCESS_TYPE_UNSPECIFIED&userProcessFilter.userAccessLevels=USER_ACCESS_LEVEL_UNSPECIFIED), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Apps Script API?

Manages and executes Google Apps Script projects. It is listed under Productivity & workspace and has 16 endpoints.

Who publishes the Apps Script API?

It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Apps Script API?

Requests go to https://script.googleapis.com. Endpoint paths are added to this base URL.

How do I authenticate with the Apps Script API?

It accepts 2 methods: OAuth 2.0 (authorization code flow) with 18 scopes; an API key in the key query parameter.

How many endpoints does the Apps Script API have?

16 operations on 11 paths (9 GET, 4 POST, 2 PUT, 1 DELETE). The largest groups are projects, projects.deployments, projects.versions, processes.

Is forking the Apps Script API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.