openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 55.2 kB
JSON
{"openapi":"3.0.0","servers":[{"url":"https://script.googleapis.com/"}],"info":{"contact":{"name":"Google","url":"https://google.com","x-twitter":"youtube"},"description":"Manages and executes Google Apps Script projects. ","license":{"name":"Creative Commons Attribution 3.0","url":"http://creativecommons.org/licenses/by/3.0/"},"termsOfService":"https://developers.google.com/terms/","title":"Apps Script API","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-apisguru-categories":["analytics","media"],"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"converter":{"url":"https://github.com/mermade/oas-kit","version":"7.0.4"},"format":"google","url":"https://script.googleapis.com/$discovery/rest?version=v1","version":"v1"}],"x-providerName":"googleapis.com","x-serviceName":"script"},"externalDocs":{"url":"https://developers.google.com/apps-script/api/"},"tags":[{"name":"processes"},{"name":"projects"},{"name":"scripts"}],"paths":{"/v1/processes":{"get":{"description":"List information about processes made by or on behalf of a user, such as process type and current status.","operationId":"script.processes.list","parameters":[{"description":"The maximum number of returned processes per page of results. Defaults to 50.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"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.","in":"query","name":"pageToken","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those originating from projects with a specific deployment ID.","in":"query","name":"userProcessFilter.deploymentId","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those that completed on or before the given timestamp.","in":"query","name":"userProcessFilter.endTime","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those originating from a script function with the given function name.","in":"query","name":"userProcessFilter.functionName","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those originating from projects with project names containing a specific string.","in":"query","name":"userProcessFilter.projectName","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those originating from projects with a specific script ID.","in":"query","name":"userProcessFilter.scriptId","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those that were started on or after the given timestamp.","in":"query","name":"userProcessFilter.startTime","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those having one of the specified process statuses.","explode":true,"in":"query","name":"userProcessFilter.statuses","schema":{"items":{"enum":["PROCESS_STATUS_UNSPECIFIED","RUNNING","PAUSED","COMPLETED","CANCELED","FAILED","TIMED_OUT","UNKNOWN","DELAYED","EXECUTION_DISABLED"],"type":"string"},"type":"array"},"style":"form"},{"description":"Optional field used to limit returned processes to those having one of the specified process types.","explode":true,"in":"query","name":"userProcessFilter.types","schema":{"items":{"enum":["PROCESS_TYPE_UNSPECIFIED","ADD_ON","EXECUTION_API","TIME_DRIVEN","TRIGGER","WEBAPP","EDITOR","SIMPLE_TRIGGER","MENU","BATCH_TASK"],"type":"string"},"type":"array"},"style":"form"},{"description":"Optional field used to limit returned processes to those having one of the specified user access levels.","explode":true,"in":"query","name":"userProcessFilter.userAccessLevels","schema":{"items":{"enum":["USER_ACCESS_LEVEL_UNSPECIFIED","NONE","READ","WRITE","OWNER"],"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserProcessesResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.processes"],"Oauth2c":["https://www.googleapis.com/auth/script.processes"]}],"tags":["processes"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/processes:listScriptProcesses":{"get":{"description":"List information about a script's executed processes, such as process type and current status.","operationId":"script.processes.listScriptProcesses","parameters":[{"description":"The maximum number of returned processes per page of results. Defaults to 50.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"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.","in":"query","name":"pageToken","schema":{"type":"string"}},{"description":"The script ID of the project whose processes are listed.","in":"query","name":"scriptId","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those originating from projects with a specific deployment ID.","in":"query","name":"scriptProcessFilter.deploymentId","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those that completed on or before the given timestamp.","in":"query","name":"scriptProcessFilter.endTime","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those originating from a script function with the given function name.","in":"query","name":"scriptProcessFilter.functionName","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those that were started on or after the given timestamp.","in":"query","name":"scriptProcessFilter.startTime","schema":{"type":"string"}},{"description":"Optional field used to limit returned processes to those having one of the specified process statuses.","explode":true,"in":"query","name":"scriptProcessFilter.statuses","schema":{"items":{"enum":["PROCESS_STATUS_UNSPECIFIED","RUNNING","PAUSED","COMPLETED","CANCELED","FAILED","TIMED_OUT","UNKNOWN","DELAYED","EXECUTION_DISABLED"],"type":"string"},"type":"array"},"style":"form"},{"description":"Optional field used to limit returned processes to those having one of the specified process types.","explode":true,"in":"query","name":"scriptProcessFilter.types","schema":{"items":{"enum":["PROCESS_TYPE_UNSPECIFIED","ADD_ON","EXECUTION_API","TIME_DRIVEN","TRIGGER","WEBAPP","EDITOR","SIMPLE_TRIGGER","MENU","BATCH_TASK"],"type":"string"},"type":"array"},"style":"form"},{"description":"Optional field used to limit returned processes to those having one of the specified user access levels.","explode":true,"in":"query","name":"scriptProcessFilter.userAccessLevels","schema":{"items":{"enum":["USER_ACCESS_LEVEL_UNSPECIFIED","NONE","READ","WRITE","OWNER"],"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListScriptProcessesResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.processes"],"Oauth2c":["https://www.googleapis.com/auth/script.processes"]}],"tags":["processes"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/projects":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Creates a new, empty script project with no script files and a base manifest file.","operationId":"script.projects.create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"],"Oauth2c":["https://www.googleapis.com/auth/script.projects"]}],"tags":["projects"]}},"/v1/projects/{scriptId}":{"get":{"description":"Gets a script project's metadata.","operationId":"script.projects.get","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"],"Oauth2c":["https://www.googleapis.com/auth/script.projects"]},{"Oauth2":["https://www.googleapis.com/auth/script.projects.readonly"],"Oauth2c":["https://www.googleapis.com/auth/script.projects.readonly"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/projects/{scriptId}/content":{"get":{"description":"Gets the content of the script project, including the code source and metadata for each script file.","operationId":"script.projects.getContent","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}},{"description":"The version number of the project to retrieve. If not provided, the project's HEAD version is returned.","in":"query","name":"versionNumber","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"],"Oauth2c":["https://www.googleapis.com/auth/script.projects"]},{"Oauth2":["https://www.googleapis.com/auth/script.projects.readonly"],"Oauth2c":["https://www.googleapis.com/auth/script.projects.readonly"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"put":{"description":"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 project.","operationId":"script.projects.updateContent","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"],"Oauth2c":["https://www.googleapis.com/auth/script.projects"]}],"tags":["projects"]}},"/v1/projects/{scriptId}/deployments":{"get":{"description":"Lists the deployments of an Apps Script project.","operationId":"script.projects.deployments.list","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}},{"description":"The maximum number of deployments on each returned page. Defaults to 50.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"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.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeploymentsResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.deployments"],"Oauth2c":["https://www.googleapis.com/auth/script.deployments"]},{"Oauth2":["https://www.googleapis.com/auth/script.deployments.readonly"],"Oauth2c":["https://www.googleapis.com/auth/script.deployments.readonly"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Creates a deployment of an Apps Script project.","operationId":"script.projects.deployments.create","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentConfig"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.deployments"],"Oauth2c":["https://www.googleapis.com/auth/script.deployments"]}],"tags":["projects"]}},"/v1/projects/{scriptId}/deployments/{deploymentId}":{"delete":{"description":"Deletes a deployment of an Apps Script project.","operationId":"script.projects.deployments.delete","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}},{"description":"The deployment ID to be undeployed.","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.deployments"],"Oauth2c":["https://www.googleapis.com/auth/script.deployments"]}],"tags":["projects"]},"get":{"description":"Gets a deployment of an Apps Script project.","operationId":"script.projects.deployments.get","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}},{"description":"The deployment ID.","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.deployments"],"Oauth2c":["https://www.googleapis.com/auth/script.deployments"]},{"Oauth2":["https://www.googleapis.com/auth/script.deployments.readonly"],"Oauth2c":["https://www.googleapis.com/auth/script.deployments.readonly"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"put":{"description":"Updates a deployment of an Apps Script project.","operationId":"script.projects.deployments.update","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}},{"description":"The deployment ID for this deployment.","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeploymentRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.deployments"],"Oauth2c":["https://www.googleapis.com/auth/script.deployments"]}],"tags":["projects"]}},"/v1/projects/{scriptId}/metrics":{"get":{"description":"Get metrics data for scripts, such as number of executions and active users.","operationId":"script.projects.getMetrics","parameters":[{"description":"Required field indicating the script to get metrics for.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}},{"description":"Optional field indicating a specific deployment to retrieve metrics from.","in":"query","name":"metricsFilter.deploymentId","schema":{"type":"string"}},{"description":"Required field indicating what granularity of metrics are returned.","in":"query","name":"metricsGranularity","schema":{"enum":["UNSPECIFIED_GRANULARITY","WEEKLY","DAILY"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metrics"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.metrics"],"Oauth2c":["https://www.googleapis.com/auth/script.metrics"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/projects/{scriptId}/versions":{"get":{"description":"List the versions of a script project.","operationId":"script.projects.versions.list","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}},{"description":"The maximum number of versions on each returned page. Defaults to 50.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"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.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVersionsResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"],"Oauth2c":["https://www.googleapis.com/auth/script.projects"]},{"Oauth2":["https://www.googleapis.com/auth/script.projects.readonly"],"Oauth2c":["https://www.googleapis.com/auth/script.projects.readonly"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Creates a new immutable version using the current code, with a unique version number.","operationId":"script.projects.versions.create","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"],"Oauth2c":["https://www.googleapis.com/auth/script.projects"]}],"tags":["projects"]}},"/v1/projects/{scriptId}/versions/{versionNumber}":{"get":{"description":"Gets a version of a script project.","operationId":"script.projects.versions.get","parameters":[{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}},{"description":"The version number.","in":"path","name":"versionNumber","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"],"Oauth2c":["https://www.googleapis.com/auth/script.projects"]},{"Oauth2":["https://www.googleapis.com/auth/script.projects.readonly"],"Oauth2c":["https://www.googleapis.com/auth/script.projects.readonly"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/scripts/{scriptId}:run":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Runs a function in an Apps Script project. The script project must be deployed for use with the Apps Script API and the calling application must share the same Cloud Platform project. This method requires authorization with an OAuth 2.0 token that includes at least one of the scopes listed in the [Authorization](#authorization-scopes) section; script projects that do not require authorization cannot be executed through this API. To find the correct scopes to include in the authentication token, open the script project **Overview** page and scroll down to \"Project OAuth Scopes.\" The error `403, PERMISSION_DENIED: The caller does not have permission` indicates that the Cloud Platform project used to authorize the request is not the same as the one used by the script.","operationId":"script.scripts.run","parameters":[{"description":"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 IDE for same script, this field should be populated with DeploymentID generated while deploying in new IDE instead of script ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://mail.google.com/"],"Oauth2c":["https://mail.google.com/"]},{"Oauth2":["https://www.google.com/calendar/feeds"],"Oauth2c":["https://www.google.com/calendar/feeds"]},{"Oauth2":["https://www.google.com/m8/feeds"],"Oauth2c":["https://www.google.com/m8/feeds"]},{"Oauth2":["https://www.googleapis.com/auth/admin.directory.group"],"Oauth2c":["https://www.googleapis.com/auth/admin.directory.group"]},{"Oauth2":["https://www.googleapis.com/auth/admin.directory.user"],"Oauth2c":["https://www.googleapis.com/auth/admin.directory.user"]},{"Oauth2":["https://www.googleapis.com/auth/documents"],"Oauth2c":["https://www.googleapis.com/auth/documents"]},{"Oauth2":["https://www.googleapis.com/auth/drive"],"Oauth2c":["https://www.googleapis.com/auth/drive"]},{"Oauth2":["https://www.googleapis.com/auth/forms"],"Oauth2c":["https://www.googleapis.com/auth/forms"]},{"Oauth2":["https://www.googleapis.com/auth/forms.currentonly"],"Oauth2c":["https://www.googleapis.com/auth/forms.currentonly"]},{"Oauth2":["https://www.googleapis.com/auth/groups"],"Oauth2c":["https://www.googleapis.com/auth/groups"]},{"Oauth2":["https://www.googleapis.com/auth/spreadsheets"],"Oauth2c":["https://www.googleapis.com/auth/spreadsheets"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"],"Oauth2c":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["scripts"]}}},"components":{"parameters":{"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"enum":["1","2"],"type":"string"}},"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"enum":["json","media","proto"],"type":"string"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"type":"string"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"description":"API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean"}},"quotaUser":{"description":"Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}}},"schemas":{"Content":{"description":"The Content resource.","properties":{"files":{"description":"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.","items":{"$ref":"#/components/schemas/File"},"type":"array"},"scriptId":{"description":"The script project's Drive ID.","type":"string"}},"type":"object"},"CreateProjectRequest":{"description":"Request to create a script project. Request to create a script project.","properties":{"parentId":{"description":"The Drive ID of a parent file that the created script project is bound to. This is usually the ID of a Google Doc, Google Sheet, Google Form, or Google Slides file. If not set, a standalone script project is created.","type":"string"},"title":{"description":"The title for the project.","type":"string"}},"type":"object"},"Deployment":{"description":"Representation of a single script deployment.","properties":{"deploymentConfig":{"$ref":"#/components/schemas/DeploymentConfig","description":"The deployment configuration."},"deploymentId":{"description":"The deployment ID for this deployment.","type":"string"},"entryPoints":{"description":"The deployment's entry points.","items":{"$ref":"#/components/schemas/EntryPoint"},"type":"array"},"updateTime":{"description":"Last modified date time stamp.","format":"google-datetime","type":"string"}},"type":"object"},"DeploymentConfig":{"description":"Metadata the defines how a deployment is configured.","properties":{"description":{"description":"The description for this deployment.","type":"string"},"manifestFileName":{"description":"The manifest file name for this deployment.","type":"string"},"scriptId":{"description":"The script project's Drive ID.","type":"string"},"versionNumber":{"description":"The version number on which this deployment is based.","format":"int32","type":"integer"}},"type":"object"},"Empty":{"description":"A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }","properties":{},"type":"object"},"EntryPoint":{"description":"A configuration that defines how a deployment is accessed externally.","properties":{"addOn":{"$ref":"#/components/schemas/GoogleAppsScriptTypeAddOnEntryPoint","description":"Add-on properties."},"entryPointType":{"description":"The type of the entry point.","enum":["ENTRY_POINT_TYPE_UNSPECIFIED","WEB_APP","EXECUTION_API","ADD_ON"],"type":"string"},"executionApi":{"$ref":"#/components/schemas/GoogleAppsScriptTypeExecutionApiEntryPoint","description":"An entry point specification for Apps Script API execution calls."},"webApp":{"$ref":"#/components/schemas/GoogleAppsScriptTypeWebAppEntryPoint","description":"An entry point specification for web apps."}},"type":"object"},"ExecuteStreamResponse":{"description":"The response for executing or debugging a function in an Apps Script project.","properties":{"result":{"$ref":"#/components/schemas/ScriptExecutionResult","description":"The result of the execution."}},"type":"object"},"ExecutionError":{"description":"An object that provides information about the nature of an error resulting from an attempted execution of a script function using the Apps Script API. If a run call succeeds but the script function (or Apps Script itself) throws an exception, the response body's error field contains a Status object. The `Status` object's `details` field contains an array with a single one of these `ExecutionError` objects.","properties":{"errorMessage":{"description":"The error message thrown by Apps Script, usually localized into the user's language.","type":"string"},"errorType":{"description":"The error type, for example `TypeError` or `ReferenceError`. If the error type is unavailable, this field is not included.","type":"string"},"scriptStackTraceElements":{"description":"An array of objects that provide a stack trace through the script to show where the execution failed, with the deepest call first.","items":{"$ref":"#/components/schemas/ScriptStackTraceElement"},"type":"array"}},"type":"object"},"ExecutionRequest":{"description":"A request to run the function in a script. The script is identified by the specified `script_id`. Executing a function on a script returns results based on the implementation of the script.","properties":{"devMode":{"description":"If `true` and the user is an owner of the script, the script runs at the most recently saved version rather than the version deployed for use with the Apps Script API. Optional; default is `false`.","type":"boolean"},"function":{"description":"The name of the function to execute in the given script. The name does not include parentheses or parameters. It can reference a function in an included library such as `Library.libFunction1`.","type":"string"},"parameters":{"description":"The parameters to be passed to the function being executed. The object type for each parameter should match the expected type in Apps Script. Parameters cannot be Apps Script-specific object types (such as a `Document` or a `Calendar`); they can only be primitive types such as `string`, `number`, `array`, `object`, or `boolean`. Optional.","items":{},"type":"array"},"sessionState":{"description":"*Deprecated*. For use with Android add-ons only. An ID that represents the user's current session in the Android app for Google Docs or Sheets, included as extra data in the [Intent](https://developer.android.com/guide/components/intents-filters.html) that launches the add-on. When an Android add-on is run with a session state, it gains the privileges of a [bound](https://developers.google.com/apps-script/guides/bound) script—that is, it can access information like the user's current cursor position (in Docs) or selected cell (in Sheets). To retrieve the state, call `Intent.getStringExtra(\"com.google.android.apps.docs.addons.SessionState\")`. Optional.","type":"string"}},"type":"object"},"ExecutionResponse":{"description":"An object that provides the return value of a function executed using the Apps Script API. If the script function returns successfully, the response body's response field contains this `ExecutionResponse` object.","properties":{"result":{"description":"The return value of the script function. The type matches the object type returned in Apps Script. Functions called using the Apps Script API cannot return Apps Script-specific objects (such as a `Document` or a `Calendar`); they can only return primitive types such as a `string`, `number`, `array`, `object`, or `boolean`."}},"type":"object"},"File":{"description":"An individual file within a script project. A file is a third-party source code created by one or more developers. It can be a server-side JS code, HTML, or a configuration file. Each script project can contain multiple files.","properties":{"createTime":{"description":"Creation date timestamp. This read-only field is only visible to users who have WRITER permission for the script project.","format":"google-datetime","type":"string"},"functionSet":{"$ref":"#/components/schemas/GoogleAppsScriptTypeFunctionSet","description":"The defined set of functions in the script file, if any."},"lastModifyUser":{"$ref":"#/components/schemas/GoogleAppsScriptTypeUser","description":"The user who modified the file most recently. This read-only field is only visible to users who have WRITER permission for the script project."},"name":{"description":"The name of the file. The file extension is not part of the file name, which can be identified from the type field.","type":"string"},"source":{"description":"The file content.","type":"string"},"type":{"description":"The type of the file.","enum":["ENUM_TYPE_UNSPECIFIED","SERVER_JS","HTML","JSON"],"type":"string"},"updateTime":{"description":"Last modified date timestamp. This read-only field is only visible to users who have WRITER permission for the script project.","format":"google-datetime","type":"string"}},"type":"object"},"GoogleAppsScriptTypeAddOnEntryPoint":{"description":"An add-on entry point.","properties":{"addOnType":{"description":"The add-on's required list of supported container types.","enum":["UNKNOWN_ADDON_TYPE","GMAIL","DATA_STUDIO"],"type":"string"},"description":{"description":"The add-on's optional description.","type":"string"},"helpUrl":{"description":"The add-on's optional help URL.","type":"string"},"postInstallTipUrl":{"description":"The add-on's required post install tip URL.","type":"string"},"reportIssueUrl":{"description":"The add-on's optional report issue URL.","type":"string"},"title":{"description":"The add-on's required title.","type":"string"}},"type":"object"},"GoogleAppsScriptTypeExecutionApiConfig":{"description":"API executable entry point configuration.","properties":{"access":{"description":"Who has permission to run the API executable.","enum":["UNKNOWN_ACCESS","MYSELF","DOMAIN","ANYONE","ANYONE_ANONYMOUS"],"type":"string"}},"type":"object"},"GoogleAppsScriptTypeExecutionApiEntryPoint":{"description":"An API executable entry point.","properties":{"entryPointConfig":{"$ref":"#/components/schemas/GoogleAppsScriptTypeExecutionApiConfig","description":"The entry point's configuration."}},"type":"object"},"GoogleAppsScriptTypeFunction":{"description":"Represents a function in a script project.","properties":{"name":{"description":"The function name in the script project.","type":"string"},"parameters":{"description":"The ordered list of parameter names of the function in the script project.","items":{"type":"string"},"type":"array"}},"type":"object"},"GoogleAppsScriptTypeFunctionSet":{"description":"A set of functions. No duplicates are permitted.","properties":{"values":{"description":"A list of functions composing the set.","items":{"$ref":"#/components/schemas/GoogleAppsScriptTypeFunction"},"type":"array"}},"type":"object"},"GoogleAppsScriptTypeProcess":{"description":"Representation of a single script process execution that was started from the script editor, a trigger, an application, or using the Apps Script API. This is distinct from the `Operation` resource, which only represents executions started via the Apps Script API.","properties":{"duration":{"description":"Duration the execution spent executing.","format":"google-duration","type":"string"},"functionName":{"description":"Name of the function the started the execution.","type":"string"},"processStatus":{"description":"The executions status.","enum":["PROCESS_STATUS_UNSPECIFIED","RUNNING","PAUSED","COMPLETED","CANCELED","FAILED","TIMED_OUT","UNKNOWN","DELAYED","EXECUTION_DISABLED"],"type":"string"},"processType":{"description":"The executions type.","enum":["PROCESS_TYPE_UNSPECIFIED","ADD_ON","EXECUTION_API","TIME_DRIVEN","TRIGGER","WEBAPP","EDITOR","SIMPLE_TRIGGER","MENU","BATCH_TASK"],"type":"string"},"projectName":{"description":"Name of the script being executed.","type":"string"},"runtimeVersion":{"description":"Which version of maestro to use to execute the script.","enum":["RUNTIME_VERSION_UNSPECIFIED","DEPRECATED_ES5","V8"],"type":"string"},"startTime":{"description":"Time the execution started.","format":"google-datetime","type":"string"},"userAccessLevel":{"description":"The executing users access level to the script.","enum":["USER_ACCESS_LEVEL_UNSPECIFIED","NONE","READ","WRITE","OWNER"],"type":"string"}},"type":"object"},"GoogleAppsScriptTypeUser":{"description":"A simple user profile resource.","properties":{"domain":{"description":"The user's domain.","type":"string"},"email":{"description":"The user's identifying email address.","type":"string"},"name":{"description":"The user's display name.","type":"string"},"photoUrl":{"description":"The user's photo.","type":"string"}},"type":"object"},"GoogleAppsScriptTypeWebAppConfig":{"description":"Web app entry point configuration.","properties":{"access":{"description":"Who has permission to run the web app.","enum":["UNKNOWN_ACCESS","MYSELF","DOMAIN","ANYONE","ANYONE_ANONYMOUS"],"type":"string"},"executeAs":{"description":"Who to execute the web app as.","enum":["UNKNOWN_EXECUTE_AS","USER_ACCESSING","USER_DEPLOYING"],"type":"string"}},"type":"object"},"GoogleAppsScriptTypeWebAppEntryPoint":{"description":"A web application entry point.","properties":{"entryPointConfig":{"$ref":"#/components/schemas/GoogleAppsScriptTypeWebAppConfig","description":"The entry point's configuration."},"url":{"description":"The URL for the web application.","type":"string"}},"type":"object"},"ListDeploymentsResponse":{"description":"Response with the list of deployments for the specified Apps Script project.","properties":{"deployments":{"description":"The list of deployments.","items":{"$ref":"#/components/schemas/Deployment"},"type":"array"},"nextPageToken":{"description":"The token that can be used in the next call to get the next page of results.","type":"string"}},"type":"object"},"ListScriptProcessesResponse":{"description":"Response with the list of Process resources.","properties":{"nextPageToken":{"description":"Token for the next page of results. If empty, there are no more pages remaining.","type":"string"},"processes":{"description":"List of processes matching request parameters.","items":{"$ref":"#/components/schemas/GoogleAppsScriptTypeProcess"},"type":"array"}},"type":"object"},"ListUserProcessesResponse":{"description":"Response with the list of Process resources.","properties":{"nextPageToken":{"description":"Token for the next page of results. If empty, there are no more pages remaining.","type":"string"},"processes":{"description":"List of processes matching request parameters.","items":{"$ref":"#/components/schemas/GoogleAppsScriptTypeProcess"},"type":"array"}},"type":"object"},"ListValue":{"description":"`ListValue` is a wrapper around a repeated field of values.","properties":{"values":{"description":"Repeated field of dynamically typed values.","items":{"$ref":"#/components/schemas/Value"},"type":"array"}},"type":"object"},"ListVersionsResponse":{"description":"Response with the list of the versions for the specified script project.","properties":{"nextPageToken":{"description":"The token use to fetch the next page of records. if not exist in the response, that means no more versions to list.","type":"string"},"versions":{"description":"The list of versions.","items":{"$ref":"#/components/schemas/Version"},"type":"array"}},"type":"object"},"Metrics":{"description":"Resource containing usage stats for a given script, based on the supplied filter and mask present in the request.","properties":{"activeUsers":{"description":"Number of active users.","items":{"$ref":"#/components/schemas/MetricsValue"},"type":"array"},"failedExecutions":{"description":"Number of failed executions.","items":{"$ref":"#/components/schemas/MetricsValue"},"type":"array"},"totalExecutions":{"description":"Number of total executions.","items":{"$ref":"#/components/schemas/MetricsValue"},"type":"array"}},"type":"object"},"MetricsValue":{"description":"Metrics value that holds number of executions counted.","properties":{"endTime":{"description":"Required field indicating the end time of the interval.","format":"google-datetime","type":"string"},"startTime":{"description":"Required field indicating the start time of the interval.","format":"google-datetime","type":"string"},"value":{"description":"Indicates the number of executions counted.","format":"uint64","type":"string"}},"type":"object"},"Operation":{"description":"A representation of an execution of an Apps Script function started with run. The execution response does not arrive until the function finishes executing. The maximum execution runtime is listed in the [Apps Script quotas guide](/apps-script/guides/services/quotas#current_limitations). After execution has started, it can have one of four outcomes: - If the script function returns successfully, the response field contains an ExecutionResponse object with the function's return value in the object's `result` field. - If the script function (or Apps Script itself) throws an exception, the error field contains a Status object. The `Status` object's `details` field contains an array with a single ExecutionError object that provides information about the nature of the error. - If the execution has not yet completed, the done field is `false` and the neither the `response` nor `error` fields are present. - If the `run` call itself fails (for example, because of a malformed request or an authorization error), the method returns an HTTP response code in the 4XX range with a different format for the response body. Client libraries automatically convert a 4XX response into an exception class. ","properties":{"done":{"description":"This field indicates whether the script execution has completed. A completed execution has a populated `response` field containing the ExecutionResponse from function that was executed.","type":"boolean"},"error":{"$ref":"#/components/schemas/Status","description":"If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, this field contains a Status object. The `Status` object's `details` field contains an array with a single ExecutionError object that provides information about the nature of the error."},"response":{"additionalProperties":{"description":"Properties of the object. Contains field @type with type URL."},"description":"If the script function returns successfully, this field contains an ExecutionResponse object with the function's return value.","type":"object"}},"type":"object"},"Project":{"description":"The script project resource.","properties":{"createTime":{"description":"When the script was created.","format":"google-datetime","type":"string"},"creator":{"$ref":"#/components/schemas/GoogleAppsScriptTypeUser","description":"User who originally created the script."},"lastModifyUser":{"$ref":"#/components/schemas/GoogleAppsScriptTypeUser","description":"User who last modified the script."},"parentId":{"description":"The parent's Drive ID that the script will be attached to. This is usually the ID of a Google Document or Google Sheet. This filed is optional, and if not set, a stand-alone script will be created.","type":"string"},"scriptId":{"description":"The script project's Drive ID.","type":"string"},"title":{"description":"The title for the project.","type":"string"},"updateTime":{"description":"When the script was last updated.","format":"google-datetime","type":"string"}},"type":"object"},"ScriptExecutionResult":{"description":"The result of an execution.","properties":{"returnValue":{"$ref":"#/components/schemas/Value","description":"The returned value of the execution."}},"type":"object"},"ScriptStackTraceElement":{"description":"A stack trace through the script that shows where the execution failed.","properties":{"function":{"description":"The name of the function that failed.","type":"string"},"lineNumber":{"description":"The line number where the script failed.","format":"int32","type":"integer"}},"type":"object"},"Status":{"description":"If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's error field contains this `Status` object.","properties":{"code":{"description":"The status code. For this API, this value either: - 10, indicating a `SCRIPT_TIMEOUT` error, - 3, indicating an `INVALID_ARGUMENT` error, or - 1, indicating a `CANCELLED` execution. ","format":"int32","type":"integer"},"details":{"description":"An array that contains a single ExecutionError object that provides information about the nature of the error.","items":{"additionalProperties":{"description":"Properties of the object. Contains field @type with type URL."},"type":"object"},"type":"array"},"message":{"description":"A developer-facing error message, which is in English. Any user-facing error message is localized and sent in the details field, or localized by the client.","type":"string"}},"type":"object"},"Struct":{"description":"`Struct` represents a structured data value, consisting of fields which map to dynamically typed values.","properties":{"fields":{"additionalProperties":{"$ref":"#/components/schemas/Value"},"description":"Unordered map of dynamically typed values.","type":"object"}},"type":"object"},"UpdateDeploymentRequest":{"description":"Request with deployment information to update an existing deployment.","properties":{"deploymentConfig":{"$ref":"#/components/schemas/DeploymentConfig","description":"The deployment configuration."}},"type":"object"},"Value":{"description":"`Value` represents a dynamically typed value which is the outcome of an executed script.","properties":{"boolValue":{"description":"Represents a boolean value.","type":"boolean"},"bytesValue":{"description":"Represents raw byte values.","format":"byte","type":"string"},"dateValue":{"description":"Represents a date in ms since the epoch.","format":"int64","type":"string"},"listValue":{"$ref":"#/components/schemas/ListValue","description":"Represents a repeated `Value`."},"nullValue":{"description":"Represents a null value.","enum":["NULL_VALUE"],"type":"string"},"numberValue":{"description":"Represents a double value.","format":"double","type":"number"},"protoValue":{"additionalProperties":{"description":"Properties of the obj