OLD | NEW |
1 { | 1 { |
2 "auth": { | 2 "auth": { |
3 "oauth2": { | 3 "oauth2": { |
4 "scopes": { | 4 "scopes": { |
5 "https://www.google.com/m8/feeds": { | |
6 "description": "Manage your contacts" | |
7 }, | |
8 "https://www.googleapis.com/auth/userinfo.email": { | |
9 "description": "View your email address" | |
10 }, | |
11 "https://www.google.com/calendar/feeds": { | |
12 "description": "Manage your calendars" | |
13 }, | |
14 "https://www.googleapis.com/auth/groups": { | 5 "https://www.googleapis.com/auth/groups": { |
15 "description": "View and manage your Google Groups" | 6 "description": "View and manage your Google Groups" |
16 }, | 7 }, |
17 "https://www.googleapis.com/auth/forms.currentonly": { | 8 "https://www.googleapis.com/auth/forms.currentonly": { |
18 "description": "View and manage forms that this application
has been installed in" | 9 "description": "View and manage forms that this application
has been installed in" |
19 }, | 10 }, |
20 "https://www.googleapis.com/auth/drive": { | 11 "https://www.googleapis.com/auth/drive": { |
21 "description": "View and manage the files in your Google Dri
ve" | 12 "description": "View and manage the files in your Google Dri
ve" |
22 }, | 13 }, |
23 "https://www.googleapis.com/auth/admin.directory.user": { | 14 "https://www.googleapis.com/auth/admin.directory.user": { |
24 "description": "View and manage the provisioning of users on
your domain" | 15 "description": "View and manage the provisioning of users on
your domain" |
25 }, | 16 }, |
26 "https://www.googleapis.com/auth/admin.directory.group": { | 17 "https://www.googleapis.com/auth/admin.directory.group": { |
27 "description": "View and manage the provisioning of groups o
n your domain" | 18 "description": "View and manage the provisioning of groups o
n your domain" |
28 }, | 19 }, |
29 "https://mail.google.com/": { | 20 "https://mail.google.com/": { |
30 "description": "Read, send, delete, and manage your email" | 21 "description": "Read, send, delete, and manage your email" |
31 }, | 22 }, |
32 "https://www.googleapis.com/auth/spreadsheets": { | 23 "https://www.googleapis.com/auth/spreadsheets": { |
33 "description": "View and manage your spreadsheets in Google
Drive" | 24 "description": "View and manage your spreadsheets in Google
Drive" |
34 }, | 25 }, |
35 "https://www.googleapis.com/auth/forms": { | 26 "https://www.googleapis.com/auth/forms": { |
36 "description": "View and manage your forms in Google Drive" | 27 "description": "View and manage your forms in Google Drive" |
| 28 }, |
| 29 "https://www.google.com/m8/feeds": { |
| 30 "description": "Manage your contacts" |
| 31 }, |
| 32 "https://www.googleapis.com/auth/userinfo.email": { |
| 33 "description": "View your email address" |
| 34 }, |
| 35 "https://www.google.com/calendar/feeds": { |
| 36 "description": "Manage your calendars" |
37 } | 37 } |
38 } | 38 } |
39 } | 39 } |
40 }, | 40 }, |
41 "basePath": "", | 41 "basePath": "", |
42 "baseUrl": "https://script.googleapis.com/", | 42 "baseUrl": "https://script.googleapis.com/", |
43 "batchPath": "batch", | 43 "batchPath": "batch", |
44 "description": "Executes Google Apps Script projects.", | 44 "description": "Executes functions in Google Apps Script projects.", |
45 "discoveryVersion": "v1", | 45 "discoveryVersion": "v1", |
46 "documentationLink": "https://developers.google.com/apps-script/execution/re
st/v1/scripts/run", | 46 "documentationLink": "https://developers.google.com/apps-script/execution/re
st/v1/scripts/run", |
47 "icons": { | 47 "icons": { |
48 "x16": "http://www.google.com/images/icons/product/search-16.gif", | 48 "x16": "http://www.google.com/images/icons/product/search-16.gif", |
49 "x32": "http://www.google.com/images/icons/product/search-32.gif" | 49 "x32": "http://www.google.com/images/icons/product/search-32.gif" |
50 }, | 50 }, |
51 "id": "script:v1", | 51 "id": "script:v1", |
52 "kind": "discovery#restDescription", | 52 "kind": "discovery#restDescription", |
53 "name": "script", | 53 "name": "script", |
54 "ownerDomain": "google.com", | 54 "ownerDomain": "google.com", |
55 "ownerName": "Google", | 55 "ownerName": "Google", |
56 "parameters": { | 56 "parameters": { |
57 "bearer_token": { | 57 "access_token": { |
58 "description": "OAuth bearer token.", | 58 "description": "OAuth access token.", |
59 "location": "query", | 59 "location": "query", |
60 "type": "string" | 60 "type": "string" |
61 }, | 61 }, |
| 62 "key": { |
| 63 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", |
| 64 "location": "query", |
| 65 "type": "string" |
| 66 }, |
| 67 "quotaUser": { |
| 68 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", |
| 69 "location": "query", |
| 70 "type": "string" |
| 71 }, |
| 72 "pp": { |
| 73 "default": "true", |
| 74 "description": "Pretty-print response.", |
| 75 "location": "query", |
| 76 "type": "boolean" |
| 77 }, |
62 "oauth_token": { | 78 "oauth_token": { |
63 "description": "OAuth 2.0 token for the current user.", | 79 "description": "OAuth 2.0 token for the current user.", |
64 "location": "query", | 80 "location": "query", |
65 "type": "string" | 81 "type": "string" |
66 }, | 82 }, |
| 83 "bearer_token": { |
| 84 "description": "OAuth bearer token.", |
| 85 "location": "query", |
| 86 "type": "string" |
| 87 }, |
67 "upload_protocol": { | 88 "upload_protocol": { |
68 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", | 89 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", |
69 "location": "query", | 90 "location": "query", |
70 "type": "string" | 91 "type": "string" |
71 }, | 92 }, |
72 "prettyPrint": { | 93 "prettyPrint": { |
73 "default": "true", | 94 "default": "true", |
74 "description": "Returns response with indentations and line breaks."
, | 95 "description": "Returns response with indentations and line breaks."
, |
75 "location": "query", | 96 "location": "query", |
76 "type": "boolean" | 97 "type": "boolean" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 "media", | 132 "media", |
112 "proto" | 133 "proto" |
113 ], | 134 ], |
114 "enumDescriptions": [ | 135 "enumDescriptions": [ |
115 "Responses with Content-Type of application/json", | 136 "Responses with Content-Type of application/json", |
116 "Media download with context-dependent Content-Type", | 137 "Media download with context-dependent Content-Type", |
117 "Responses with Content-Type of application/x-protobuf" | 138 "Responses with Content-Type of application/x-protobuf" |
118 ], | 139 ], |
119 "location": "query", | 140 "location": "query", |
120 "type": "string" | 141 "type": "string" |
121 }, | |
122 "access_token": { | |
123 "description": "OAuth access token.", | |
124 "location": "query", | |
125 "type": "string" | |
126 }, | |
127 "key": { | |
128 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", | |
129 "location": "query", | |
130 "type": "string" | |
131 }, | |
132 "quotaUser": { | |
133 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", | |
134 "location": "query", | |
135 "type": "string" | |
136 }, | |
137 "pp": { | |
138 "default": "true", | |
139 "description": "Pretty-print response.", | |
140 "location": "query", | |
141 "type": "boolean" | |
142 } | 142 } |
143 }, | 143 }, |
144 "protocol": "rest", | 144 "protocol": "rest", |
145 "resources": { | 145 "resources": { |
146 "scripts": { | 146 "scripts": { |
147 "methods": { | 147 "methods": { |
148 "run": { | 148 "run": { |
149 "description": "Runs a function in an Apps Script project. T
he project must be deployed\nfor use with the Apps Script Execution API.\n\nThis
method requires authorization with an OAuth 2.0 token that includes at\nleast o
ne 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 pr
oject in the script editor, then select\n**File > Project properties** and click
the **Scopes** tab.", | 149 "description": "Runs a function in an Apps Script project. T
he project must be deployed\nfor use with the Apps Script Execution API.\n\nThis
method requires authorization with an OAuth 2.0 token that includes at\nleast o
ne 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 pr
oject in the script editor, then select\n**File > Project properties** and click
the **Scopes** tab.", |
150 "httpMethod": "POST", | 150 "httpMethod": "POST", |
151 "id": "script.scripts.run", | 151 "id": "script.scripts.run", |
152 "parameterOrder": [ | 152 "parameterOrder": [ |
153 "scriptId" | 153 "scriptId" |
154 ], | 154 ], |
155 "parameters": { | 155 "parameters": { |
156 "scriptId": { | 156 "scriptId": { |
157 "description": "The project key of the script to be
executed. To find the project key, open\nthe project in the script editor and se
lect **File > Project properties**.", | 157 "description": "The script ID of the script to be ex
ecuted. To find the script ID, open\nthe project in the script editor and select
**File > Project properties**.", |
158 "location": "path", | 158 "location": "path", |
159 "required": true, | 159 "required": true, |
160 "type": "string" | 160 "type": "string" |
161 } | 161 } |
162 }, | 162 }, |
163 "path": "v1/scripts/{scriptId}:run", | 163 "path": "v1/scripts/{scriptId}:run", |
164 "request": { | 164 "request": { |
165 "$ref": "ExecutionRequest" | 165 "$ref": "ExecutionRequest" |
166 }, | 166 }, |
167 "response": { | 167 "response": { |
168 "$ref": "Operation" | 168 "$ref": "Operation" |
169 }, | 169 }, |
170 "scopes": [ | 170 "scopes": [ |
171 "https://mail.google.com/", | 171 "https://mail.google.com/", |
172 "https://www.google.com/calendar/feeds", | 172 "https://www.google.com/calendar/feeds", |
173 "https://www.google.com/m8/feeds", | 173 "https://www.google.com/m8/feeds", |
174 "https://www.googleapis.com/auth/admin.directory.group", | 174 "https://www.googleapis.com/auth/admin.directory.group", |
175 "https://www.googleapis.com/auth/admin.directory.user", | 175 "https://www.googleapis.com/auth/admin.directory.user", |
176 "https://www.googleapis.com/auth/drive", | 176 "https://www.googleapis.com/auth/drive", |
177 "https://www.googleapis.com/auth/forms", | 177 "https://www.googleapis.com/auth/forms", |
178 "https://www.googleapis.com/auth/forms.currentonly", | 178 "https://www.googleapis.com/auth/forms.currentonly", |
179 "https://www.googleapis.com/auth/groups", | 179 "https://www.googleapis.com/auth/groups", |
180 "https://www.googleapis.com/auth/spreadsheets", | 180 "https://www.googleapis.com/auth/spreadsheets", |
181 "https://www.googleapis.com/auth/userinfo.email" | 181 "https://www.googleapis.com/auth/userinfo.email" |
182 ] | 182 ] |
183 } | 183 } |
184 } | 184 } |
185 } | 185 } |
186 }, | 186 }, |
187 "revision": "20170720", | 187 "revision": "20170815", |
188 "rootUrl": "https://script.googleapis.com/", | 188 "rootUrl": "https://script.googleapis.com/", |
189 "schemas": { | 189 "schemas": { |
190 "ExecutionError": { | |
191 "description": "An object that provides information about the nature
of an error in the Apps\nScript Execution API. If an\n`run` call succeeds but t
he\nscript function (or Apps Script itself) throws an exception, the response\nb
ody's `error` field contains a\n`Status` object. The `Status` object's `details`
field\ncontains an array with a single one of these `ExecutionError` objects.", | |
192 "id": "ExecutionError", | |
193 "properties": { | |
194 "errorType": { | |
195 "description": "The error type, for example `TypeError` or `
ReferenceError`. If the error\ntype is unavailable, this field is not included."
, | |
196 "type": "string" | |
197 }, | |
198 "errorMessage": { | |
199 "description": "The error message thrown by Apps Script, usu
ally localized into the user's\nlanguage.", | |
200 "type": "string" | |
201 }, | |
202 "scriptStackTraceElements": { | |
203 "description": "An array of objects that provide a stack tra
ce through the script to show\nwhere the execution failed, with the deepest call
first.", | |
204 "items": { | |
205 "$ref": "ScriptStackTraceElement" | |
206 }, | |
207 "type": "array" | |
208 } | |
209 }, | |
210 "type": "object" | |
211 }, | |
212 "Status": { | |
213 "description": "If a `run` call succeeds but the script function (or
Apps Script itself) throws an exception, the response body's `error` field will
contain this `Status` object.", | |
214 "id": "Status", | |
215 "properties": { | |
216 "code": { | |
217 "description": "The status code. For this API, this value wi
ll always be 3, corresponding to an INVALID_ARGUMENT error.", | |
218 "format": "int32", | |
219 "type": "integer" | |
220 }, | |
221 "message": { | |
222 "description": "A developer-facing error message, which is i
n English. Any user-facing error message is localized and sent in the [`google.r
pc.Status.details`](google.rpc.Status.details) field, or localized by the client
.", | |
223 "type": "string" | |
224 }, | |
225 "details": { | |
226 "description": "An array that contains a single `ExecutionEr
ror` object that provides information about the nature of the error.", | |
227 "items": { | |
228 "additionalProperties": { | |
229 "description": "Properties of the object. Contains f
ield @type with type URL.", | |
230 "type": "any" | |
231 }, | |
232 "type": "object" | |
233 }, | |
234 "type": "array" | |
235 } | |
236 }, | |
237 "type": "object" | |
238 }, | |
239 "ExecutionRequest": { | |
240 "description": "A request to run the function in a script. The scrip
t is identified by the\nspecified `script_id`. Executing a function on a script
returns results\nbased on the implementation of the script.", | |
241 "id": "ExecutionRequest", | |
242 "properties": { | |
243 "parameters": { | |
244 "description": "The parameters to be passed to the function
being executed. The object type\nfor each parameter should match the expected ty
pe 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`s
tring`, `number`, `array`, `object`, or `boolean`. Optional.", | |
245 "items": { | |
246 "type": "any" | |
247 }, | |
248 "type": "array" | |
249 }, | |
250 "sessionState": { | |
251 "description": "For Android add-ons only. An ID that represe
nts the user's current session\nin the Android app for Google Docs or Sheets, in
cluded as extra data in the\n[`Intent`](https://developer.android.com/guide/comp
onents/intents-filters.html)\nthat launches the add-on. When an Android add-on i
s run with a session\nstate, it gains the privileges of a\n[bound](https://devel
opers.google.com/apps-script/guides/bound) script —\nthat is, it can acces
s information like the user's current cursor position\n(in Docs) or selected cel
l (in Sheets). To retrieve the state, call\n`Intent.getStringExtra(\"com.google.
android.apps.docs.addons.SessionState\")`.\nOptional.", | |
252 "type": "string" | |
253 }, | |
254 "devMode": { | |
255 "description": "If `true` and the user is an owner of the sc
ript, the script runs at the\nmost recently saved version rather than the versio
n deployed for use with\nthe Execution API. Optional; default is `false`.", | |
256 "type": "boolean" | |
257 }, | |
258 "function": { | |
259 "description": "The name of the function to execute in the g
iven script. The name does not\ninclude parentheses or parameters.", | |
260 "type": "string" | |
261 } | |
262 }, | |
263 "type": "object" | |
264 }, | |
265 "JoinAsyncRequest": { | |
266 "description": "A request to retrieve the results from a collection
of requests,\nspecified by the operation resource names.", | |
267 "id": "JoinAsyncRequest", | |
268 "properties": { | |
269 "names": { | |
270 "description": "List of operation resource names that we wan
t to join,\nas returned from a call to RunAsync.", | |
271 "items": { | |
272 "type": "string" | |
273 }, | |
274 "type": "array" | |
275 }, | |
276 "timeout": { | |
277 "description": "Timeout for information retrieval in millise
conds.", | |
278 "format": "google-duration", | |
279 "type": "string" | |
280 }, | |
281 "scriptId": { | |
282 "description": "The script id which specifies the script whi
ch all processes in the names\nfield must be from.", | |
283 "type": "string" | |
284 } | |
285 }, | |
286 "type": "object" | |
287 }, | |
288 "ExecutionResponse": { | 190 "ExecutionResponse": { |
289 "description": "An object that provides the return value of a functi
on executed through the\nApps Script Execution API. If a\n`run` call succeeds an
d the\nscript function returns successfully, the response body's\n`response` fie
ld contains this\n`ExecutionResponse` object.", | 191 "description": "An object that provides the return value of a functi
on executed through the\nApps Script Execution API. If a\n`run` call succeeds an
d the\nscript function returns successfully, the response body's\n`response` fie
ld contains this\n`ExecutionResponse` object.", |
290 "id": "ExecutionResponse", | 192 "id": "ExecutionResponse", |
291 "properties": { | 193 "properties": { |
292 "result": { | 194 "result": { |
293 "description": "The return value of the script function. The
type matches the object type\nreturned in Apps Script. Functions called through
the Execution API cannot\nreturn Apps Script-specific objects (such as a `Docum
ent` or a `Calendar`);\nthey can only return primitive types such as a `string`,
`number`, `array`,\n`object`, or `boolean`.", | 195 "description": "The return value of the script function. The
type matches the object type\nreturned in Apps Script. Functions called through
the Execution API cannot\nreturn Apps Script-specific objects (such as a `Docum
ent` or a `Calendar`);\nthey can only return primitive types such as a `string`,
`number`, `array`,\n`object`, or `boolean`.", |
294 "type": "any" | 196 "type": "any" |
295 } | 197 } |
296 }, | 198 }, |
297 "type": "object" | 199 "type": "object" |
298 }, | 200 }, |
299 "Operation": { | 201 "Operation": { |
300 "description": "The response will not arrive until the function fini
shes executing. The maximum runtime is listed in the guide to [limitations in Ap
ps Script](https://developers.google.com/apps-script/guides/services/quotas#curr
ent_limitations).\n<p>If the script function returns successfully, the `response
` field will contain an `ExecutionResponse` object with the function's return va
lue in the object's `result` field.</p>\n<p>If the script function (or Apps Scri
pt itself) throws an exception, the `error` field will contain a `Status` object
. The `Status` object's `details` field will contain an array with a single `Exe
cutionError` object that provides information about the nature of the error.</p>
\n<p>If the `run` call itself fails (for example, because of a malformed request
or an authorization error), the method will return an HTTP response code in the
4XX range with a different format for the response body. Client libraries will
automatically convert a 4XX response into an exception class.</p>", | 202 "description": "The response will not arrive until the function fini
shes executing. The maximum runtime is listed in the guide to [limitations in Ap
ps Script](https://developers.google.com/apps-script/guides/services/quotas#curr
ent_limitations).\n<p>If the script function returns successfully, the `response
` field will contain an `ExecutionResponse` object with the function's return va
lue in the object's `result` field.</p>\n<p>If the script function (or Apps Scri
pt itself) throws an exception, the `error` field will contain a `Status` object
. The `Status` object's `details` field will contain an array with a single `Exe
cutionError` object that provides information about the nature of the error.</p>
\n<p>If the `run` call itself fails (for example, because of a malformed request
or an authorization error), the method will return an HTTP response code in the
4XX range with a different format for the response body. Client libraries will
automatically convert a 4XX response into an exception class.</p>", |
301 "id": "Operation", | 203 "id": "Operation", |
302 "properties": { | 204 "properties": { |
303 "done": { | |
304 "description": "This field is not used.", | |
305 "type": "boolean" | |
306 }, | |
307 "response": { | 205 "response": { |
308 "additionalProperties": { | 206 "additionalProperties": { |
309 "description": "Properties of the object. Contains field
@type with type URL.", | 207 "description": "Properties of the object. Contains field
@type with type URL.", |
310 "type": "any" | 208 "type": "any" |
311 }, | 209 }, |
312 "description": "If the script function returns successfully,
this field will contain an `ExecutionResponse` object with the function's retur
n value as the object's `result` field.", | 210 "description": "If the script function returns successfully,
this field will contain an `ExecutionResponse` object with the function's retur
n value as the object's `result` field.", |
313 "type": "object" | 211 "type": "object" |
314 }, | 212 }, |
315 "name": { | 213 "name": { |
316 "description": "This field is not used.", | 214 "description": "This field is only used with asynchronous ex
ecutions and contains a unique identifier that can be used to subsequently invok
e a `get` `cancel` or `join` on the asynchronous script execution identified by
this name.", |
317 "type": "string" | 215 "type": "string" |
318 }, | 216 }, |
319 "error": { | 217 "error": { |
320 "$ref": "Status", | 218 "$ref": "Status", |
321 "description": "If a `run` call succeeds but the script func
tion (or Apps Script itself) throws an exception, this field will contain a `Sta
tus` object. The `Status` object's `details` field will contain an array with a
single `ExecutionError` object that provides information about the nature of the
error." | 219 "description": "If a `run` call succeeds but the script func
tion (or Apps Script itself) throws an exception, this field will contain a `Sta
tus` object. The `Status` object's `details` field will contain an array with a
single `ExecutionError` object that provides information about the nature of the
error." |
322 }, | 220 }, |
323 "metadata": { | 221 "metadata": { |
324 "additionalProperties": { | 222 "additionalProperties": { |
325 "description": "Properties of the object. Contains field
@type with type URL.", | 223 "description": "Properties of the object. Contains field
@type with type URL.", |
326 "type": "any" | 224 "type": "any" |
327 }, | 225 }, |
328 "description": "This field is not used.", | 226 "description": "This field is not used.", |
329 "type": "object" | 227 "type": "object" |
| 228 }, |
| 229 "done": { |
| 230 "description": "This field is only used with asynchronous ex
ecutions and indicates whether or not the script execution has completed. A comp
leted execution has a populated response field containing the `ExecutionResponse
` from function that was executed.", |
| 231 "type": "boolean" |
330 } | 232 } |
331 }, | 233 }, |
332 "type": "object" | 234 "type": "object" |
333 }, | |
334 "JoinAsyncResponse": { | |
335 "description": "An object that provides the return value for the Joi
nAsync method.", | |
336 "id": "JoinAsyncResponse", | |
337 "properties": { | |
338 "results": { | |
339 "additionalProperties": { | |
340 "$ref": "Operation" | |
341 }, | |
342 "description": "The return values for each script function,
in a map of operation resource\nnames to the Operation containing the result of
the process. The response\nwill contain either an error or the result of the scr
ipt function.", | |
343 "type": "object" | |
344 } | |
345 }, | |
346 "type": "object" | |
347 }, | 235 }, |
348 "ScriptStackTraceElement": { | 236 "ScriptStackTraceElement": { |
349 "description": "A stack trace through the script that shows where th
e execution failed.", | 237 "description": "A stack trace through the script that shows where th
e execution failed.", |
350 "id": "ScriptStackTraceElement", | 238 "id": "ScriptStackTraceElement", |
351 "properties": { | 239 "properties": { |
352 "function": { | 240 "function": { |
353 "description": "The name of the function that failed.", | 241 "description": "The name of the function that failed.", |
354 "type": "string" | 242 "type": "string" |
355 }, | 243 }, |
356 "lineNumber": { | 244 "lineNumber": { |
357 "description": "The line number where the script failed.", | 245 "description": "The line number where the script failed.", |
358 "format": "int32", | 246 "format": "int32", |
359 "type": "integer" | 247 "type": "integer" |
360 } | 248 } |
361 }, | 249 }, |
362 "type": "object" | 250 "type": "object" |
| 251 }, |
| 252 "ExecutionError": { |
| 253 "description": "An object that provides information about the nature
of an error in the Apps\nScript Execution API. If an\n`run` call succeeds but t
he\nscript function (or Apps Script itself) throws an exception, the response\nb
ody's `error` field contains a\n`Status` object. The `Status` object's `details`
field\ncontains an array with a single one of these `ExecutionError` objects.", |
| 254 "id": "ExecutionError", |
| 255 "properties": { |
| 256 "scriptStackTraceElements": { |
| 257 "description": "An array of objects that provide a stack tra
ce through the script to show\nwhere the execution failed, with the deepest call
first.", |
| 258 "items": { |
| 259 "$ref": "ScriptStackTraceElement" |
| 260 }, |
| 261 "type": "array" |
| 262 }, |
| 263 "errorType": { |
| 264 "description": "The error type, for example `TypeError` or `
ReferenceError`. If the error\ntype is unavailable, this field is not included."
, |
| 265 "type": "string" |
| 266 }, |
| 267 "errorMessage": { |
| 268 "description": "The error message thrown by Apps Script, usu
ally localized into the user's\nlanguage.", |
| 269 "type": "string" |
| 270 } |
| 271 }, |
| 272 "type": "object" |
| 273 }, |
| 274 "Status": { |
| 275 "description": "If a `run` call succeeds but the script function (or
Apps Script itself) throws an exception, the response body's `error` field will
contain this `Status` object.", |
| 276 "id": "Status", |
| 277 "properties": { |
| 278 "message": { |
| 279 "description": "A developer-facing error message, which is i
n English. Any user-facing error message is localized and sent in the [`google.r
pc.Status.details`](google.rpc.Status.details) field, or localized by the client
.", |
| 280 "type": "string" |
| 281 }, |
| 282 "details": { |
| 283 "description": "An array that contains a single `ExecutionEr
ror` object that provides information about the nature of the error.", |
| 284 "items": { |
| 285 "additionalProperties": { |
| 286 "description": "Properties of the object. Contains f
ield @type with type URL.", |
| 287 "type": "any" |
| 288 }, |
| 289 "type": "object" |
| 290 }, |
| 291 "type": "array" |
| 292 }, |
| 293 "code": { |
| 294 "description": "The status code. For this API, this value wi
ll always be 3, corresponding to an <code>INVALID_ARGUMENT</code> error.", |
| 295 "format": "int32", |
| 296 "type": "integer" |
| 297 } |
| 298 }, |
| 299 "type": "object" |
| 300 }, |
| 301 "ExecutionRequest": { |
| 302 "description": "A request to run the function in a script. The scrip
t is identified by the\nspecified `script_id`. Executing a function on a script
returns results\nbased on the implementation of the script.", |
| 303 "id": "ExecutionRequest", |
| 304 "properties": { |
| 305 "devMode": { |
| 306 "description": "If `true` and the user is an owner of the sc
ript, the script runs at the\nmost recently saved version rather than the versio
n deployed for use with\nthe Execution API. Optional; default is `false`.", |
| 307 "type": "boolean" |
| 308 }, |
| 309 "function": { |
| 310 "description": "The name of the function to execute in the g
iven script. The name does not\ninclude parentheses or parameters.", |
| 311 "type": "string" |
| 312 }, |
| 313 "parameters": { |
| 314 "description": "The parameters to be passed to the function
being executed. The object type\nfor each parameter should match the expected ty
pe 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`s
tring`, `number`, `array`, `object`, or `boolean`. Optional.", |
| 315 "items": { |
| 316 "type": "any" |
| 317 }, |
| 318 "type": "array" |
| 319 }, |
| 320 "sessionState": { |
| 321 "description": "For Android add-ons only. An ID that represe
nts the user's current session\nin the Android app for Google Docs or Sheets, in
cluded as extra data in the\n[`Intent`](https://developer.android.com/guide/comp
onents/intents-filters.html)\nthat launches the add-on. When an Android add-on i
s run with a session\nstate, it gains the privileges of a\n[bound](https://devel
opers.google.com/apps-script/guides/bound) script —\nthat is, it can acces
s information like the user's current cursor position\n(in Docs) or selected cel
l (in Sheets). To retrieve the state, call\n`Intent.getStringExtra(\"com.google.
android.apps.docs.addons.SessionState\")`.\nOptional.", |
| 322 "type": "string" |
| 323 } |
| 324 }, |
| 325 "type": "object" |
363 } | 326 } |
364 }, | 327 }, |
365 "servicePath": "", | 328 "servicePath": "", |
366 "title": "Google Apps Script Execution API", | 329 "title": "Google Apps Script Execution API", |
367 "version": "v1" | 330 "version": "v1" |
368 } | 331 } |
OLD | NEW |