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://mail.google.com/": { |
| 15 "description": "Read, send, delete, and manage your email" |
| 16 }, |
| 17 "https://www.googleapis.com/auth/spreadsheets": { |
| 18 "description": "View and manage your spreadsheets in Google
Drive" |
| 19 }, |
14 "https://www.googleapis.com/auth/admin.directory.group": { | 20 "https://www.googleapis.com/auth/admin.directory.group": { |
15 "description": "View and manage the provisioning of groups o
n your domain" | 21 "description": "View and manage the provisioning of groups o
n your domain" |
16 }, | 22 }, |
17 "https://www.googleapis.com/auth/admin.directory.user": { | 23 "https://www.googleapis.com/auth/admin.directory.user": { |
18 "description": "View and manage the provisioning of users on
your domain" | 24 "description": "View and manage the provisioning of users on
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 "quotaUser": { | 57 "bearer_token": { |
58 "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.", | 58 "description": "OAuth bearer token.", |
59 "location": "query", | 59 "location": "query", |
60 "type": "string" | 60 "type": "string" |
61 }, | 61 }, |
62 "pp": { | |
63 "default": "true", | |
64 "description": "Pretty-print response.", | |
65 "location": "query", | |
66 "type": "boolean" | |
67 }, | |
68 "oauth_token": { | 62 "oauth_token": { |
69 "description": "OAuth 2.0 token for the current user.", | 63 "description": "OAuth 2.0 token for the current user.", |
70 "location": "query", | 64 "location": "query", |
71 "type": "string" | 65 "type": "string" |
72 }, | 66 }, |
73 "bearer_token": { | |
74 "description": "OAuth bearer token.", | |
75 "location": "query", | |
76 "type": "string" | |
77 }, | |
78 "upload_protocol": { | 67 "upload_protocol": { |
79 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", | 68 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", |
80 "location": "query", | 69 "location": "query", |
81 "type": "string" | 70 "type": "string" |
82 }, | 71 }, |
83 "prettyPrint": { | 72 "prettyPrint": { |
84 "default": "true", | 73 "default": "true", |
85 "description": "Returns response with indentations and line breaks."
, | 74 "description": "Returns response with indentations and line breaks."
, |
86 "location": "query", | 75 "location": "query", |
87 "type": "boolean" | 76 "type": "boolean" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 "proto" | 112 "proto" |
124 ], | 113 ], |
125 "enumDescriptions": [ | 114 "enumDescriptions": [ |
126 "Responses with Content-Type of application/json", | 115 "Responses with Content-Type of application/json", |
127 "Media download with context-dependent Content-Type", | 116 "Media download with context-dependent Content-Type", |
128 "Responses with Content-Type of application/x-protobuf" | 117 "Responses with Content-Type of application/x-protobuf" |
129 ], | 118 ], |
130 "location": "query", | 119 "location": "query", |
131 "type": "string" | 120 "type": "string" |
132 }, | 121 }, |
| 122 "key": { |
| 123 "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.", |
| 124 "location": "query", |
| 125 "type": "string" |
| 126 }, |
133 "access_token": { | 127 "access_token": { |
134 "description": "OAuth access token.", | 128 "description": "OAuth access token.", |
135 "location": "query", | 129 "location": "query", |
136 "type": "string" | 130 "type": "string" |
137 }, | 131 }, |
138 "key": { | 132 "quotaUser": { |
139 "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.", | 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.", |
140 "location": "query", | 134 "location": "query", |
141 "type": "string" | 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", |
(...skipping 25 matching lines...) Expand all 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": "20170321", | 187 "revision": "20170407", |
188 "rootUrl": "https://script.googleapis.com/", | 188 "rootUrl": "https://script.googleapis.com/", |
189 "schemas": { | 189 "schemas": { |
190 "ExecutionResponse": { | 190 "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.", | 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.", |
192 "id": "ExecutionResponse", | 192 "id": "ExecutionResponse", |
193 "properties": { | 193 "properties": { |
194 "result": { | 194 "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`.", | 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`.", |
196 "type": "any" | 196 "type": "any" |
197 } | 197 } |
198 }, | 198 }, |
199 "type": "object" | 199 "type": "object" |
200 }, | 200 }, |
201 "Operation": { | 201 "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>", | 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>", |
203 "id": "Operation", | 203 "id": "Operation", |
204 "properties": { | 204 "properties": { |
| 205 "done": { |
| 206 "description": "This field is not used.", |
| 207 "type": "boolean" |
| 208 }, |
205 "response": { | 209 "response": { |
206 "additionalProperties": { | 210 "additionalProperties": { |
207 "description": "Properties of the object. Contains field
@type with type URL.", | 211 "description": "Properties of the object. Contains field
@type with type URL.", |
208 "type": "any" | 212 "type": "any" |
209 }, | 213 }, |
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.", | 214 "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" | 215 "type": "object" |
212 }, | 216 }, |
213 "name": { | 217 "name": { |
214 "description": "This field is not used.", | 218 "description": "This field is not used.", |
215 "type": "string" | 219 "type": "string" |
216 }, | 220 }, |
217 "error": { | 221 "error": { |
218 "$ref": "Status", | 222 "$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." | 223 "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 }, | 224 }, |
221 "metadata": { | 225 "metadata": { |
222 "additionalProperties": { | 226 "additionalProperties": { |
223 "description": "Properties of the object. Contains field
@type with type URL.", | 227 "description": "Properties of the object. Contains field
@type with type URL.", |
224 "type": "any" | 228 "type": "any" |
225 }, | 229 }, |
226 "description": "This field is not used.", | 230 "description": "This field is not used.", |
227 "type": "object" | 231 "type": "object" |
228 }, | |
229 "done": { | |
230 "description": "This field is not used.", | |
231 "type": "boolean" | |
232 } | 232 } |
233 }, | 233 }, |
234 "type": "object" | 234 "type": "object" |
235 }, | 235 }, |
236 "ScriptStackTraceElement": { | 236 "ScriptStackTraceElement": { |
237 "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.", |
238 "id": "ScriptStackTraceElement", | 238 "id": "ScriptStackTraceElement", |
239 "properties": { | 239 "properties": { |
240 "function": { | 240 "function": { |
241 "description": "The name of the function that failed.", | 241 "description": "The name of the function that failed.", |
242 "type": "string" | 242 "type": "string" |
243 }, | 243 }, |
244 "lineNumber": { | 244 "lineNumber": { |
245 "description": "The line number where the script failed.", | 245 "description": "The line number where the script failed.", |
246 "format": "int32", | 246 "format": "int32", |
247 "type": "integer" | 247 "type": "integer" |
248 } | 248 } |
249 }, | 249 }, |
250 "type": "object" | 250 "type": "object" |
251 }, | 251 }, |
252 "ExecutionError": { | 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.", | 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", | 254 "id": "ExecutionError", |
255 "properties": { | 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 }, |
256 "errorType": { | 263 "errorType": { |
257 "description": "The error type, for example `TypeError` or `
ReferenceError`. If the error\ntype is unavailable, this field is not included."
, | 264 "description": "The error type, for example `TypeError` or `
ReferenceError`. If the error\ntype is unavailable, this field is not included."
, |
258 "type": "string" | 265 "type": "string" |
259 }, | 266 }, |
260 "errorMessage": { | 267 "errorMessage": { |
261 "description": "The error message thrown by Apps Script, usu
ally localized into the user's\nlanguage.", | 268 "description": "The error message thrown by Apps Script, usu
ally localized into the user's\nlanguage.", |
262 "type": "string" | 269 "type": "string" |
263 }, | |
264 "scriptStackTraceElements": { | |
265 "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.", | |
266 "items": { | |
267 "$ref": "ScriptStackTraceElement" | |
268 }, | |
269 "type": "array" | |
270 } | 270 } |
271 }, | 271 }, |
272 "type": "object" | 272 "type": "object" |
273 }, | 273 }, |
274 "Status": { | 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.", | 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", | 276 "id": "Status", |
277 "properties": { | 277 "properties": { |
278 "message": { | 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
.", | 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
.", |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 "type": "array" | 322 "type": "array" |
323 } | 323 } |
324 }, | 324 }, |
325 "type": "object" | 325 "type": "object" |
326 } | 326 } |
327 }, | 327 }, |
328 "servicePath": "", | 328 "servicePath": "", |
329 "title": "Google Apps Script Execution API", | 329 "title": "Google Apps Script Execution API", |
330 "version": "v1" | 330 "version": "v1" |
331 } | 331 } |
OLD | NEW |