OLD | NEW |
1 { | 1 { |
2 "auth": { | 2 "auth": { |
3 "oauth2": { | 3 "oauth2": { |
4 "scopes": { | 4 "scopes": { |
5 "https://www.googleapis.com/auth/groups": { | 5 "https://www.googleapis.com/auth/groups": { |
6 "description": "View and manage your Google Groups" | 6 "description": "View and manage your Google Groups" |
7 }, | 7 }, |
8 "https://www.googleapis.com/auth/forms.currentonly": { | 8 "https://www.googleapis.com/auth/forms.currentonly": { |
9 "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" |
10 }, | 10 }, |
11 "https://www.googleapis.com/auth/drive": { | 11 "https://www.googleapis.com/auth/drive": { |
12 "description": "View and manage the files in your Google Dri
ve" | 12 "description": "View and manage the files in your Google Dri
ve" |
13 }, | 13 }, |
| 14 "https://www.googleapis.com/auth/spreadsheets": { |
| 15 "description": "View and manage your spreadsheets in Google
Drive" |
| 16 }, |
| 17 "https://mail.google.com/": { |
| 18 "description": "Read, send, delete, and manage your email" |
| 19 }, |
14 "https://www.googleapis.com/auth/admin.directory.user": { | 20 "https://www.googleapis.com/auth/admin.directory.user": { |
15 "description": "View and manage the provisioning of users on
your domain" | 21 "description": "View and manage the provisioning of users on
your domain" |
16 }, | 22 }, |
17 "https://www.googleapis.com/auth/admin.directory.group": { | 23 "https://www.googleapis.com/auth/admin.directory.group": { |
18 "description": "View and manage the provisioning of groups o
n your domain" | 24 "description": "View and manage the provisioning of groups o
n your domain" |
19 }, | 25 }, |
20 "https://mail.google.com/": { | |
21 "description": "Read, send, delete, and manage your email" | |
22 }, | |
23 "https://www.googleapis.com/auth/spreadsheets": { | |
24 "description": "View and manage your spreadsheets in Google
Drive" | |
25 }, | |
26 "https://www.googleapis.com/auth/forms": { | 26 "https://www.googleapis.com/auth/forms": { |
27 "description": "View and manage your forms in Google Drive" | 27 "description": "View and manage your forms in Google Drive" |
28 }, | 28 }, |
29 "https://www.google.com/m8/feeds": { | 29 "https://www.google.com/m8/feeds": { |
30 "description": "Manage your contacts" | 30 "description": "Manage your contacts" |
31 }, | 31 }, |
32 "https://www.googleapis.com/auth/userinfo.email": { | 32 "https://www.googleapis.com/auth/userinfo.email": { |
33 "description": "View your email address" | 33 "description": "View your email address" |
34 }, | 34 }, |
35 "https://www.google.com/calendar/feeds": { | 35 "https://www.google.com/calendar/feeds": { |
(...skipping 11 matching lines...) Expand all Loading... |
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 "key": { |
| 58 "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.", |
| 59 "location": "query", |
| 60 "type": "string" |
| 61 }, |
57 "access_token": { | 62 "access_token": { |
58 "description": "OAuth access token.", | 63 "description": "OAuth access token.", |
59 "location": "query", | 64 "location": "query", |
60 "type": "string" | 65 "type": "string" |
61 }, | 66 }, |
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": { | 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.", | 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", | 69 "location": "query", |
70 "type": "string" | 70 "type": "string" |
71 }, | 71 }, |
72 "pp": { | 72 "pp": { |
73 "default": "true", | 73 "default": "true", |
74 "description": "Pretty-print response.", | 74 "description": "Pretty-print response.", |
75 "location": "query", | 75 "location": "query", |
76 "type": "boolean" | 76 "type": "boolean" |
(...skipping 12 matching lines...) Expand all Loading... |
89 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", | 89 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", |
90 "location": "query", | 90 "location": "query", |
91 "type": "string" | 91 "type": "string" |
92 }, | 92 }, |
93 "prettyPrint": { | 93 "prettyPrint": { |
94 "default": "true", | 94 "default": "true", |
95 "description": "Returns response with indentations and line breaks."
, | 95 "description": "Returns response with indentations and line breaks."
, |
96 "location": "query", | 96 "location": "query", |
97 "type": "boolean" | 97 "type": "boolean" |
98 }, | 98 }, |
| 99 "fields": { |
| 100 "description": "Selector specifying which fields to include in a par
tial response.", |
| 101 "location": "query", |
| 102 "type": "string" |
| 103 }, |
99 "uploadType": { | 104 "uploadType": { |
100 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", | 105 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", |
101 "location": "query", | 106 "location": "query", |
102 "type": "string" | 107 "type": "string" |
103 }, | 108 }, |
104 "fields": { | |
105 "description": "Selector specifying which fields to include in a par
tial response.", | |
106 "location": "query", | |
107 "type": "string" | |
108 }, | |
109 "callback": { | 109 "callback": { |
110 "description": "JSONP", | 110 "description": "JSONP", |
111 "location": "query", | 111 "location": "query", |
112 "type": "string" | 112 "type": "string" |
113 }, | 113 }, |
114 "$.xgafv": { | 114 "$.xgafv": { |
115 "description": "V1 error format.", | 115 "description": "V1 error format.", |
116 "enum": [ | 116 "enum": [ |
117 "1", | 117 "1", |
118 "2" | 118 "2" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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": "20170815", | 187 "revision": "20170829", |
188 "rootUrl": "https://script.googleapis.com/", | 188 "rootUrl": "https://script.googleapis.com/", |
189 "schemas": { | 189 "schemas": { |
| 190 "Status": { |
| 191 "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.", |
| 192 "id": "Status", |
| 193 "properties": { |
| 194 "details": { |
| 195 "description": "An array that contains a single `ExecutionEr
ror` object that provides information about the nature of the error.", |
| 196 "items": { |
| 197 "additionalProperties": { |
| 198 "description": "Properties of the object. Contains f
ield @type with type URL.", |
| 199 "type": "any" |
| 200 }, |
| 201 "type": "object" |
| 202 }, |
| 203 "type": "array" |
| 204 }, |
| 205 "code": { |
| 206 "description": "The status code. For this API, this value wi
ll always be 3, corresponding to an <code>INVALID_ARGUMENT</code> error.", |
| 207 "format": "int32", |
| 208 "type": "integer" |
| 209 }, |
| 210 "message": { |
| 211 "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
.", |
| 212 "type": "string" |
| 213 } |
| 214 }, |
| 215 "type": "object" |
| 216 }, |
| 217 "ExecutionRequest": { |
| 218 "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.", |
| 219 "id": "ExecutionRequest", |
| 220 "properties": { |
| 221 "sessionState": { |
| 222 "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.", |
| 223 "type": "string" |
| 224 }, |
| 225 "devMode": { |
| 226 "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`.", |
| 227 "type": "boolean" |
| 228 }, |
| 229 "function": { |
| 230 "description": "The name of the function to execute in the g
iven script. The name does not\ninclude parentheses or parameters.", |
| 231 "type": "string" |
| 232 }, |
| 233 "parameters": { |
| 234 "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.", |
| 235 "items": { |
| 236 "type": "any" |
| 237 }, |
| 238 "type": "array" |
| 239 } |
| 240 }, |
| 241 "type": "object" |
| 242 }, |
190 "ExecutionResponse": { | 243 "ExecutionResponse": { |
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.", | 244 "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.", |
192 "id": "ExecutionResponse", | 245 "id": "ExecutionResponse", |
193 "properties": { | 246 "properties": { |
194 "result": { | 247 "result": { |
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`.", | 248 "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`.", |
196 "type": "any" | 249 "type": "any" |
197 } | 250 } |
198 }, | 251 }, |
199 "type": "object" | 252 "type": "object" |
200 }, | 253 }, |
201 "Operation": { | 254 "Operation": { |
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>", | 255 "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>", |
203 "id": "Operation", | 256 "id": "Operation", |
204 "properties": { | 257 "properties": { |
| 258 "done": { |
| 259 "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.", |
| 260 "type": "boolean" |
| 261 }, |
205 "response": { | 262 "response": { |
206 "additionalProperties": { | 263 "additionalProperties": { |
207 "description": "Properties of the object. Contains field
@type with type URL.", | 264 "description": "Properties of the object. Contains field
@type with type URL.", |
208 "type": "any" | 265 "type": "any" |
209 }, | 266 }, |
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.", | 267 "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.", |
211 "type": "object" | 268 "type": "object" |
212 }, | 269 }, |
213 "name": { | |
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.", | |
215 "type": "string" | |
216 }, | |
217 "error": { | 270 "error": { |
218 "$ref": "Status", | 271 "$ref": "Status", |
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." | 272 "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." |
220 }, | 273 }, |
221 "metadata": { | 274 "metadata": { |
222 "additionalProperties": { | 275 "additionalProperties": { |
223 "description": "Properties of the object. Contains field
@type with type URL.", | 276 "description": "Properties of the object. Contains field
@type with type URL.", |
224 "type": "any" | 277 "type": "any" |
225 }, | 278 }, |
226 "description": "This field is not used.", | 279 "description": "This field is not used.", |
227 "type": "object" | 280 "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" | |
232 } | 281 } |
233 }, | 282 }, |
234 "type": "object" | 283 "type": "object" |
235 }, | 284 }, |
236 "ScriptStackTraceElement": { | 285 "ScriptStackTraceElement": { |
237 "description": "A stack trace through the script that shows where th
e execution failed.", | 286 "description": "A stack trace through the script that shows where th
e execution failed.", |
238 "id": "ScriptStackTraceElement", | 287 "id": "ScriptStackTraceElement", |
239 "properties": { | 288 "properties": { |
240 "function": { | 289 "function": { |
241 "description": "The name of the function that failed.", | 290 "description": "The name of the function that failed.", |
242 "type": "string" | 291 "type": "string" |
243 }, | 292 }, |
244 "lineNumber": { | 293 "lineNumber": { |
245 "description": "The line number where the script failed.", | 294 "description": "The line number where the script failed.", |
246 "format": "int32", | 295 "format": "int32", |
247 "type": "integer" | 296 "type": "integer" |
248 } | 297 } |
249 }, | 298 }, |
250 "type": "object" | 299 "type": "object" |
251 }, | 300 }, |
252 "ExecutionError": { | 301 "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.", | 302 "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", | 303 "id": "ExecutionError", |
255 "properties": { | 304 "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": { | 305 "errorType": { |
264 "description": "The error type, for example `TypeError` or `
ReferenceError`. If the error\ntype is unavailable, this field is not included."
, | 306 "description": "The error type, for example `TypeError` or `
ReferenceError`. If the error\ntype is unavailable, this field is not included."
, |
265 "type": "string" | 307 "type": "string" |
266 }, | 308 }, |
267 "errorMessage": { | 309 "errorMessage": { |
268 "description": "The error message thrown by Apps Script, usu
ally localized into the user's\nlanguage.", | 310 "description": "The error message thrown by Apps Script, usu
ally localized into the user's\nlanguage.", |
269 "type": "string" | 311 "type": "string" |
| 312 }, |
| 313 "scriptStackTraceElements": { |
| 314 "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.", |
| 315 "items": { |
| 316 "$ref": "ScriptStackTraceElement" |
| 317 }, |
| 318 "type": "array" |
270 } | 319 } |
271 }, | 320 }, |
272 "type": "object" | 321 "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" | |
326 } | 322 } |
327 }, | 323 }, |
328 "servicePath": "", | 324 "servicePath": "", |
329 "title": "Google Apps Script Execution API", | 325 "title": "Google Apps Script Execution API", |
330 "version": "v1" | 326 "version": "v1" |
331 } | 327 } |
OLD | NEW |