UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 47.4 kB
{"openapi":"3.0.0","info":{"contact":{"name":"Google","url":"https://google.com"},"description":"Manages and executes Google Apps Script projects.\n","title":"Apps Script","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-apisguru-categories":["cloud"],"x-logo":{"url":"https://www.gstatic.com/images/icons/material/product/2x/apps_script_64dp.png"},"x-origin":[{"converter":{"url":"https://github.com/lucybot/api-spec-converter","version":"2.7.18"},"format":"google","url":"https://script.googleapis.com/$discovery/rest?version=v1","version":"v1"}],"x-preferred":true,"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,\nsuch as process type and current status.","operationId":"script.processes.list","parameters":[{"description":"The maximum number of returned processes per page of results. Defaults to\n50.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"The token for continuing a previous list request on the next page. This\nshould 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\nprojects 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\non 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\na 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\nprojects 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\nprojects 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\nstarted 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\nthe specified process statuses.","in":"query","name":"userProcessFilter.statuses","explode":true,"schema":{"type":"array","items":{"enum":["PROCESS_STATUS_UNSPECIFIED","RUNNING","PAUSED","COMPLETED","CANCELED","FAILED","TIMED_OUT","UNKNOWN","DELAYED"],"type":"string"}}},{"description":"Optional field used to limit returned processes to those having one of\nthe specified process types.","in":"query","name":"userProcessFilter.types","explode":true,"schema":{"type":"array","items":{"enum":["PROCESS_TYPE_UNSPECIFIED","ADD_ON","EXECUTION_API","TIME_DRIVEN","TRIGGER","WEBAPP","EDITOR","SIMPLE_TRIGGER","MENU","BATCH_TASK"],"type":"string"}}},{"description":"Optional field used to limit returned processes to those having one of\nthe specified user access levels.","in":"query","name":"userProcessFilter.userAccessLevels","explode":true,"schema":{"type":"array","items":{"enum":["USER_ACCESS_LEVEL_UNSPECIFIED","NONE","READ","WRITE","OWNER"],"type":"string"}}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ListUserProcessesResponse"}}}}},"security":[{"Oauth2":["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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]},"/v1/processes:listScriptProcesses":{"get":{"description":"List information about a script's executed processes, such as process type\nand current status.","operationId":"script.processes.listScriptProcesses","parameters":[{"description":"The maximum number of returned processes per page of results. Defaults to\n50.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"The token for continuing a previous list request on the next page. This\nshould 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\nprojects 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\non 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\na 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\nstarted 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\nthe specified process statuses.","in":"query","name":"scriptProcessFilter.statuses","explode":true,"schema":{"type":"array","items":{"enum":["PROCESS_STATUS_UNSPECIFIED","RUNNING","PAUSED","COMPLETED","CANCELED","FAILED","TIMED_OUT","UNKNOWN","DELAYED"],"type":"string"}}},{"description":"Optional field used to limit returned processes to those having one of\nthe specified process types.","in":"query","name":"scriptProcessFilter.types","explode":true,"schema":{"type":"array","items":{"enum":["PROCESS_TYPE_UNSPECIFIED","ADD_ON","EXECUTION_API","TIME_DRIVEN","TRIGGER","WEBAPP","EDITOR","SIMPLE_TRIGGER","MENU","BATCH_TASK"],"type":"string"}}},{"description":"Optional field used to limit returned processes to those having one of\nthe specified user access levels.","in":"query","name":"scriptProcessFilter.userAccessLevels","explode":true,"schema":{"type":"array","items":{"enum":["USER_ACCESS_LEVEL_UNSPECIFIED","NONE","READ","WRITE","OWNER"],"type":"string"}}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ListScriptProcessesResponse"}}}}},"security":[{"Oauth2":["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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]},"/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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Creates a new, empty script project with no script files and a base\nmanifest file.","operationId":"script.projects.create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Project"}}}}},"security":[{"Oauth2":["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":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Project"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"]},{"Oauth2":["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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]},"/v1/projects/{scriptId}/content":{"get":{"description":"Gets the content of the script project, including the code source and\nmetadata 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\nproject's HEAD version is returned.","in":"query","name":"versionNumber","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Content"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"]},{"Oauth2":["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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"put":{"description":"Updates the content of the specified script project.\nThis content is stored as the HEAD version, and is used when the script is\nexecuted as a trigger, in the script editor, in add-on preview mode, or as\na web app or Apps Script API in development mode. This clears all the\nexisting 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":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Content"}}}}},"security":[{"Oauth2":["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 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\nshould be set to the value of `nextPageToken` from a previous response.","in":"query","name":"pageToken","schema":{"type":"string"}},{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ListDeploymentsResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.deployments"]},{"Oauth2":["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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"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":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Deployment"}}}}},"security":[{"Oauth2":["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 deployment ID to be undeployed.","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}},{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Empty"}}}}},"security":[{"Oauth2":["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 deployment ID.","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}},{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Deployment"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.deployments"]},{"Oauth2":["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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"put":{"description":"Updates a deployment of an Apps Script project.","operationId":"script.projects.deployments.update","parameters":[{"description":"The deployment ID for this deployment.","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}},{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeploymentRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Deployment"}}}}},"security":[{"Oauth2":["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\nactive users.","operationId":"script.projects.getMetrics","parameters":[{"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":{"type":"string","enum":["UNSPECIFIED_GRANULARITY","WEEKLY","DAILY"]}},{"description":"Required field indicating the script to get metrics for.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Metrics"}}}}},"security":[{"Oauth2":["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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]},"/v1/projects/{scriptId}/versions":{"get":{"description":"List the versions of a script project.","operationId":"script.projects.versions.list","parameters":[{"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\nshould be set to the value of `nextPageToken` from a previous response.","in":"query","name":"pageToken","schema":{"type":"string"}},{"description":"The script project's Drive ID.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ListVersionsResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"]},{"Oauth2":["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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Creates a new immutable version using the current code, with a unique\nversion 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":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Version"}}}}},"security":[{"Oauth2":["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":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Version"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/script.projects"]},{"Oauth2":["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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]},"/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/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Runs a function in an Apps Script project. The script project must be\ndeployed for use with the Apps Script API and the calling application must\nshare the same Cloud Platform project.\n\nThis method requires authorization with an OAuth 2.0 token that includes at\nleast one of the scopes listed in the [Authorization](#authorization)\nsection; script projects that do not require authorization cannot be\nexecuted through this API. To find the correct scopes to include in the\nauthentication token, open the project in the script editor, then select\n**File > Project properties** and click the **Scopes** tab.\n\nThe error `403, PERMISSION_DENIED: The caller does not have permission`\nindicates that the Cloud Platform project used to authorize the request is\nnot the same as the one used by the script.","operationId":"script.scripts.run","parameters":[{"description":"The script ID of the script to be executed. To find the script ID, open\nthe project in the script editor and select **File > Project properties**.","in":"path","name":"scriptId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Operation"}}}}},"security":[{"Oauth2":["https://mail.google.com/"]},{"Oauth2":["https://www.google.com/calendar/feeds"]},{"Oauth2":["https://www.google.com/m8/feeds"]},{"Oauth2":["https://www.googleapis.com/auth/admin.directory.group"]},{"Oauth2":["https://www.googleapis.com/auth/admin.directory.user"]},{"Oauth2":["https://www.googleapis.com/auth/documents"]},{"Oauth2":["https://www.googleapis.com/auth/drive"]},{"Oauth2":["https://www.googleapis.com/auth/forms"]},{"Oauth2":["https://www.googleapis.com/auth/forms.currentonly"]},{"Oauth2":["https://www.googleapis.com/auth/groups"]},{"Oauth2":["https://www.googleapis.com/auth/spreadsheets"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["scripts"]}}},"servers":[{"url":"https://script.googleapis.com/"}],"components":{"parameters":{"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":{"type":"string","enum":["json","media","proto"],"default":"json"}},"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","default":true}},"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"}},"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"type":"string","enum":["1","2"]}}},"securitySchemes":{"Oauth2":{"description":"Oauth 2.0 authentication","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://accounts.google.com/o/oauth2/auth","scopes":{"https://mail.google.com/":"Read, compose, send, and permanently delete all your email from Gmail","https://www.google.com/calendar/feeds":"See, edit, share, and permanently delete all the calendars you can access using Google Calendar","https://www.google.com/m8/feeds":"See, edit, download, and permanently delete your contacts","https://www.googleapis.com/auth/admin.directory.group":"View and manage the provisioning of groups on your domain","https://www.googleapis.com/auth/admin.directory.user":"View and manage the provisioning of users on your domain","https://www.googleapis.com/auth/documents":"View and manage your Google Docs documents","https://www.googleapis.com/auth/drive":"See, edit, create, and delete all of your Google Drive files","https://www.googleapis.com/auth/forms":"View and manage your forms in Google Drive","https://www.googleapis.com/auth/forms.currentonly":"View and manage forms that this application has been installed in","https://www.googleapis.com/auth/groups":"View and manage your Google Groups","https://www.googleapis.com/auth/script.deployments":"Create and update Google Apps Script deployments","https://www.googleapis.com/auth/script.deployments.readonly":"View Google Apps Script deployments","https://www.googleapis.com/auth/script.metrics":"View Google Apps Script project's metrics","https://www.googleapis.com/auth/script.processes":"View Google Apps Script processes","https://www.googleapis.com/auth/script.projects":"Create and update Google Apps Script projects","https://www.googleapis.com/auth/script.projects.readonly":"View Google Apps Script projects","https://www.googleapis.com/auth/spreadsheets":"See, edit, create, and delete your spreadsheets in Google Drive","https://www.googleapis.com/auth/userinfo.email":"View your email address"}}}}},"schemas":{"Content":{"description":"The Content resource.","properties":{"files":{"description":"The list of script project files.\nOne of the files is a script manifest; it must be named \"appsscript\",\nmust have type of JSON, and include the manifest configurations for the\nproject.","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.","properties":{"parentId":{"description":"The Drive ID of a parent file that the created script project is bound to.\nThis is usually the ID of a Google Doc, Google Sheet, Google Form, or\nGoogle 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"},"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\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.","properties":{},"type":"object"},"EntryPoint":{"description":"A configuration that defines how a deployment is accessed externally.","properties":{"addOn":{"$ref":"#/components/schemas/GoogleAppsScriptTypeAddOnEntryPoint"},"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"},"webApp":{"$ref":"#/components/schemas/GoogleAppsScriptTypeWebAppEntryPoint"}},"type":"object"},"ExecutionError":{"description":"An object that provides information about the nature of an error resulting\nfrom an attempted execution of a script function using the Apps Script API.\nIf a run call\nsucceeds but the script function (or Apps Script itself) throws an exception,\nthe response body's error field\ncontains a\nStatus object. The `Status` object's `details` field\ncontains 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\nlanguage.","type":"string"},"errorType":{"description":"The error type, for example `TypeError` or `ReferenceError`. If the error\ntype 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\nwhere 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\nspecified `script_id`. Executing a function on a script returns results\nbased 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\nmost recently saved version rather than the version deployed for use with\nthe 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\ninclude parentheses or parameters. It can reference a function in an\nincluded library such as `Library.libFunction1`.","type":"string"},"parameters":{"description":"The parameters to be passed to the function being executed. The object type\nfor each parameter should match the expected type in Apps Script.\nParameters cannot be Apps Script-specific object types (such as a\n`Document` or a `Calendar`); they can only be primitive types such as\n`string`, `number`, `array`, `object`, or `boolean`. Optional.","items":{},"type":"array"},"sessionState":{"description":"<b>Deprecated</b>. For use with Android add-ons only. An ID that represents\nthe user's current session in the Android app for Google Docs or Sheets,\nincluded as extra data in the\n[Intent](https://developer.android.com/guide/components/intents-filters.html)\nthat launches the add-on. When an Android add-on is run with a session\nstate, it gains the privileges of a\n[bound](https://developers.google.com/apps-script/guides/bound)\nscript&mdash;that is, it can access information like the user's current\ncursor position (in Docs) or selected cell (in Sheets). To retrieve the\nstate, call\n`Intent.getStringExtra(\"com.google.android.apps.docs.addons.SessionState\")`.\nOptional.","type":"string"}},"type":"object"},"ExecutionResponse":{"description":"An object that provides the return value of a function executed using the\nApps Script API. If the script function returns successfully, the response\nbody's response field contains this\n`ExecutionResponse` object.","properties":{"result":{"description":"The return value of the script function. The type matches the object type\nreturned in Apps Script. Functions called using the Apps Script API cannot\nreturn Apps Script-specific objects (such as a `Document` or a `Calendar`);\nthey can only return primitive types such as a `string`, `number`, `array`,\n`object`, or `boolean`."}},"type":"object"},"File":{"description":"An individual file within a script project.\nA file is a third-party source code created by one or more\ndevelopers. It can be a server-side JS code, HTML, or a\nconfiguration file. Each script project can contain multiple files.","properties":{"createTime":{"description":"Creation date timestamp.\nThis read-only field is only visible to users who have WRITER\npermission for the script project.","format":"google-datetime","type":"string"},"functionSet":{"$ref":"#/components/schemas/GoogleAppsScriptTypeFunctionSet"},"lastModifyUser":{"$ref":"#/components/schemas/GoogleAppsScriptTypeUser"},"name":{"description":"The name of the file. The file extension is not part of the file\nname, 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.\nThis read-only field is only visible to users who have WRITER\npermission 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"}},"type":"object"},"GoogleAppsScriptTypeFunction":{"description":"Represents a function in a script project.","properties":{"name":{"description":"The function name in the script project.","type":"string"}},"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\nthe script editor, a trigger, an application, or using the Apps Script API.\nThis is distinct from the `Operation`\nresource, which only represents executions started via the Apps Script API.","properties":{"duration":{"description":"Duration the execution spent executing.","format":"google-duration","type":"string"},"executingUser":{"description":"User-facing name for the user executing the script.","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"],"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"},"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"},"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\nresults.","type":"string"}},"type":"object"},"ListScriptProcessesResponse":{"description":"Response with the list of\nProcess resources.","properties":{"nextPageToken":{"description":"Token for the next page of results. If empty, there are no more pages\nremaining.","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\nProcess resources.","properties":{"nextPageToken":{"description":"Token for the next page of results. If empty, there are no more pages\nremaining.","type":"string"},"processes":{"description":"List of processes matching request parameters.","items":{"$ref":"#/components/schemas/GoogleAppsScriptTypeProcess"},"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\nresponse, 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\nfilter 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). <p>After execution has started, it can have one of four outcomes:</p> <ul> <li> If the script function returns successfully, the\n response field contains an\n ExecutionResponse object\n with the function's return value in the object's `result` field.</li>\n<li> If the script function (or Apps Script itself) throws an exception, the\n error field contains a\n Status object. The `Status` object's `details`\n field contains an array with a single\n ExecutionError object that\n provides information about the nature of the error.</li>\n<li> If the execution has not yet completed,\n the done field is `false` and\n the neither the `response` nor `error` fields are present.</li>\n<li> If the `run` call itself fails (for example, because of a\n malformed request or an authorization error), the method returns an HTTP\n response code in the 4XX range with a different format for the response\n body. Client libraries automatically convert a 4XX response into an\n exception class.</li>\n</ul>","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"},"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"},"lastModifyUser":{"$ref":"#/components/schemas/GoogleAppsScriptTypeUser"},"parentId":{"description":"The parent's Drive ID that the script will be attached to. This is usually\nthe ID of a Google Document or Google Sheet. This filed is optional, and\nif 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"},"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: <ul> <li> 10, indicating a `SCRIPT_TIMEOUT` error,</li> <li> 3, indicating an `INVALID_ARGUMENT` error, or</li> <li> 1, indicating a `CANCELLED` execution.</li> </ul>","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"},"UpdateDeploymentRequest":{"description":"Request with deployment information to update an existing deployment.","properties":{"deploymentConfig":{"$ref":"#/components/schemas/DeploymentConfig"}},"type":"object"},"Version":{"description":"A resource representing a script project version. A version is a \"snapshot\"\nof a script project and is similar to a read-only branched release. When\ncreating deployments, the version to use must be specified.","properties":{"createTime":{"description":"When the version was created.","format":"google-datetime","type":"string"},"description":{"description":"The description for this version.","type":"string"},"scriptId":{"description":"The script project's Drive ID.","type":"string"},"versionNumber":{"description":"The incremental ID that is created by Apps Script when a version is\ncreated. This is system assigned number and is immutable once created.","format":"int32","type":"integer"}},"type":"object"}}}}