Debian Codegraph @

docs/dyn/script_v1.projects.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="script_v1.html">Apps Script API</a> . <a href="script_v1.projects.html">projects</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="script_v1.projects.deployments.html">deployments()</a></code>
79 </p>
80 <p class="firstline">Returns the deployments Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="script_v1.projects.versions.html">versions()</a></code>
84 </p>
85 <p class="firstline">Returns the versions Resource.</p>
86
87 <p class="toc_element">
88 <code><a href="#close">close()</a></code></p>
89 <p class="firstline">Close httplib2 connections.</p>
90 <p class="toc_element">
91 <code><a href="#create">create(body=None, x__xgafv=None)</a></code></p>
92 <p class="firstline">Creates a new, empty script project with no script files and a base manifest file.</p>
93 <p class="toc_element">
94 <code><a href="#get">get(scriptId, x__xgafv=None)</a></code></p>
95 <p class="firstline">Gets a script project's metadata.</p>
96 <p class="toc_element">
97 <code><a href="#getContent">getContent(scriptId, versionNumber=None, x__xgafv=None)</a></code></p>
98 <p class="firstline">Gets the content of the script project, including the code source and metadata for each script file.</p>
99 <p class="toc_element">
100 <code><a href="#getMetrics">getMetrics(scriptId, metricsFilter_deploymentId=None, metricsGranularity=None, x__xgafv=None)</a></code></p>
101 <p class="firstline">Get metrics data for scripts, such as number of executions and active users.</p>
102 <p class="toc_element">
103 <code><a href="#updateContent">updateContent(scriptId, body=None, x__xgafv=None)</a></code></p>
104 <p class="firstline">Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project.</p>
105 <h3>Method Details</h3>
106 <div class="method">
107 <code class="details" id="close">close()</code>
108 <pre>Close httplib2 connections.</pre>
109 </div>
110
111 <div class="method">
112 <code class="details" id="create">create(body=None, x__xgafv=None)</code>
113 <pre>Creates a new, empty script project with no script files and a base manifest file.
114
115 Args:
116 body: object, The request body.
117 The object takes the form of:
118
119 { # Request to create a script project.
120 &quot;parentId&quot;: &quot;A String&quot;, # The Drive ID of a parent file that the created script project is bound to. This is usually the ID of a Google Doc, Google Sheet, Google Form, or Google Slides file. If not set, a standalone script project is created.
121 &quot;title&quot;: &quot;A String&quot;, # The title for the project.
122 }
123
124 x__xgafv: string, V1 error format.
125 Allowed values
126 1 - v1 error format
127 2 - v2 error format
128
129 Returns:
130 An object of the form:
131
132 { # The script project resource.
133 &quot;createTime&quot;: &quot;A String&quot;, # When the script was created.
134 &quot;creator&quot;: { # A simple user profile resource. # User who originally created the script.
135 &quot;domain&quot;: &quot;A String&quot;, # The user&#x27;s domain.
136 &quot;email&quot;: &quot;A String&quot;, # The user&#x27;s identifying email address.
137 &quot;name&quot;: &quot;A String&quot;, # The user&#x27;s display name.
138 &quot;photoUrl&quot;: &quot;A String&quot;, # The user&#x27;s photo.
139 },
140 &quot;lastModifyUser&quot;: { # A simple user profile resource. # User who last modified the script.
141 &quot;domain&quot;: &quot;A String&quot;, # The user&#x27;s domain.
142 &quot;email&quot;: &quot;A String&quot;, # The user&#x27;s identifying email address.
143 &quot;name&quot;: &quot;A String&quot;, # The user&#x27;s display name.
144 &quot;photoUrl&quot;: &quot;A String&quot;, # The user&#x27;s photo.
145 },
146 &quot;parentId&quot;: &quot;A String&quot;, # The parent&#x27;s Drive ID that the script will be attached to. This is usually the ID of a Google Document or Google Sheet. This field is optional, and if not set, a stand-alone script will be created.
147 &quot;scriptId&quot;: &quot;A String&quot;, # The script project&#x27;s Drive ID.
148 &quot;title&quot;: &quot;A String&quot;, # The title for the project.
149 &quot;updateTime&quot;: &quot;A String&quot;, # When the script was last updated.
150 }</pre>
151 </div>
152
153 <div class="method">
154 <code class="details" id="get">get(scriptId, x__xgafv=None)</code>
155 <pre>Gets a script project&#x27;s metadata.
156
157 Args:
158 scriptId: string, The script project&#x27;s Drive ID. (required)
159 x__xgafv: string, V1 error format.
160 Allowed values
161 1 - v1 error format
162 2 - v2 error format
163
164 Returns:
165 An object of the form:
166
167 { # The script project resource.
168 &quot;createTime&quot;: &quot;A String&quot;, # When the script was created.
169 &quot;creator&quot;: { # A simple user profile resource. # User who originally created the script.
170 &quot;domain&quot;: &quot;A String&quot;, # The user&#x27;s domain.
171 &quot;email&quot;: &quot;A String&quot;, # The user&#x27;s identifying email address.
172 &quot;name&quot;: &quot;A String&quot;, # The user&#x27;s display name.
173 &quot;photoUrl&quot;: &quot;A String&quot;, # The user&#x27;s photo.
174 },
175 &quot;lastModifyUser&quot;: { # A simple user profile resource. # User who last modified the script.
176 &quot;domain&quot;: &quot;A String&quot;, # The user&#x27;s domain.
177 &quot;email&quot;: &quot;A String&quot;, # The user&#x27;s identifying email address.
178 &quot;name&quot;: &quot;A String&quot;, # The user&#x27;s display name.
179 &quot;photoUrl&quot;: &quot;A String&quot;, # The user&#x27;s photo.
180 },
181 &quot;parentId&quot;: &quot;A String&quot;, # The parent&#x27;s Drive ID that the script will be attached to. This is usually the ID of a Google Document or Google Sheet. This field is optional, and if not set, a stand-alone script will be created.
182 &quot;scriptId&quot;: &quot;A String&quot;, # The script project&#x27;s Drive ID.
183 &quot;title&quot;: &quot;A String&quot;, # The title for the project.
184 &quot;updateTime&quot;: &quot;A String&quot;, # When the script was last updated.
185 }</pre>
186 </div>
187
188 <div class="method">
189 <code class="details" id="getContent">getContent(scriptId, versionNumber=None, x__xgafv=None)</code>
190 <pre>Gets the content of the script project, including the code source and metadata for each script file.
191
192 Args:
193 scriptId: string, The script project&#x27;s Drive ID. (required)
194 versionNumber: integer, The version number of the project to retrieve. If not provided, the project&#x27;s HEAD version is returned.
195 x__xgafv: string, V1 error format.
196 Allowed values
197 1 - v1 error format
198 2 - v2 error format
199
200 Returns:
201 An object of the form:
202
203 { # The Content resource.
204 &quot;files&quot;: [ # The list of script project files. One of the files is a script manifest; it must be named &quot;appsscript&quot;, must have type of JSON, and include the manifest configurations for the project.
205 { # An individual file within a script project. A file is a third-party source code created by one or more developers. It can be a server-side JS code, HTML, or a configuration file. Each script project can contain multiple files.
206 &quot;createTime&quot;: &quot;A String&quot;, # Creation date timestamp.
207 &quot;functionSet&quot;: { # A set of functions. No duplicates are permitted. # The defined set of functions in the script file, if any.
208 &quot;values&quot;: [ # A list of functions composing the set.
209 { # Represents a function in a script project.
210 &quot;name&quot;: &quot;A String&quot;, # The function name in the script project.
211 &quot;parameters&quot;: [ # The ordered list of parameter names of the function in the script project.
212 &quot;A String&quot;,
213 ],
214 },
215 ],
216 },
217 &quot;lastModifyUser&quot;: { # A simple user profile resource. # The user who modified the file most recently. The details visible in this object are controlled by the profile visibility settings of the last modifying user.
218 &quot;domain&quot;: &quot;A String&quot;, # The user&#x27;s domain.
219 &quot;email&quot;: &quot;A String&quot;, # The user&#x27;s identifying email address.
220 &quot;name&quot;: &quot;A String&quot;, # The user&#x27;s display name.
221 &quot;photoUrl&quot;: &quot;A String&quot;, # The user&#x27;s photo.
222 },
223 &quot;name&quot;: &quot;A String&quot;, # The name of the file. The file extension is not part of the file name, which can be identified from the type field.
224 &quot;source&quot;: &quot;A String&quot;, # The file content.
225 &quot;type&quot;: &quot;A String&quot;, # The type of the file.
226 &quot;updateTime&quot;: &quot;A String&quot;, # Last modified date timestamp.
227 },
228 ],
229 &quot;scriptId&quot;: &quot;A String&quot;, # The script project&#x27;s Drive ID.
230 }</pre>
231 </div>
232
233 <div class="method">
234 <code class="details" id="getMetrics">getMetrics(scriptId, metricsFilter_deploymentId=None, metricsGranularity=None, x__xgafv=None)</code>
235 <pre>Get metrics data for scripts, such as number of executions and active users.
236
237 Args:
238 scriptId: string, Required field indicating the script to get metrics for. (required)
239 metricsFilter_deploymentId: string, Optional field indicating a specific deployment to retrieve metrics from.
240 metricsGranularity: string, Required field indicating what granularity of metrics are returned.
241 Allowed values
242 UNSPECIFIED_GRANULARITY - Default metric granularity used to query no metrics.
243 WEEKLY - Represents weekly metrics.
244 DAILY - Represents daily metrics over a period of 7 days.
245 x__xgafv: string, V1 error format.
246 Allowed values
247 1 - v1 error format
248 2 - v2 error format
249
250 Returns:
251 An object of the form:
252
253 { # Resource containing usage stats for a given script, based on the supplied filter and mask present in the request.
254 &quot;activeUsers&quot;: [ # Number of active users.
255 { # Metrics value that holds number of executions counted.
256 &quot;endTime&quot;: &quot;A String&quot;, # Required field indicating the end time of the interval.
257 &quot;startTime&quot;: &quot;A String&quot;, # Required field indicating the start time of the interval.
258 &quot;value&quot;: &quot;A String&quot;, # Indicates the number of executions counted.
259 },
260 ],
261 &quot;failedExecutions&quot;: [ # Number of failed executions.
262 { # Metrics value that holds number of executions counted.
263 &quot;endTime&quot;: &quot;A String&quot;, # Required field indicating the end time of the interval.
264 &quot;startTime&quot;: &quot;A String&quot;, # Required field indicating the start time of the interval.
265 &quot;value&quot;: &quot;A String&quot;, # Indicates the number of executions counted.
266 },
267 ],
268 &quot;totalExecutions&quot;: [ # Number of total executions.
269 { # Metrics value that holds number of executions counted.
270 &quot;endTime&quot;: &quot;A String&quot;, # Required field indicating the end time of the interval.
271 &quot;startTime&quot;: &quot;A String&quot;, # Required field indicating the start time of the interval.
272 &quot;value&quot;: &quot;A String&quot;, # Indicates the number of executions counted.
273 },
274 ],
275 }</pre>
276 </div>
277
278 <div class="method">
279 <code class="details" id="updateContent">updateContent(scriptId, body=None, x__xgafv=None)</code>
280 <pre>Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project.
281
282 Args:
283 scriptId: string, The script project&#x27;s Drive ID. (required)
284 body: object, The request body.
285 The object takes the form of:
286
287 { # The Content resource.
288 &quot;files&quot;: [ # The list of script project files. One of the files is a script manifest; it must be named &quot;appsscript&quot;, must have type of JSON, and include the manifest configurations for the project.
289 { # An individual file within a script project. A file is a third-party source code created by one or more developers. It can be a server-side JS code, HTML, or a configuration file. Each script project can contain multiple files.
290 &quot;createTime&quot;: &quot;A String&quot;, # Creation date timestamp.
291 &quot;functionSet&quot;: { # A set of functions. No duplicates are permitted. # The defined set of functions in the script file, if any.
292 &quot;values&quot;: [ # A list of functions composing the set.
293 { # Represents a function in a script project.
294 &quot;name&quot;: &quot;A String&quot;, # The function name in the script project.
295 &quot;parameters&quot;: [ # The ordered list of parameter names of the function in the script project.
296 &quot;A String&quot;,
297 ],
298 },
299 ],
300 },
301 &quot;lastModifyUser&quot;: { # A simple user profile resource. # The user who modified the file most recently. The details visible in this object are controlled by the profile visibility settings of the last modifying user.
302 &quot;domain&quot;: &quot;A String&quot;, # The user&#x27;s domain.
303 &quot;email&quot;: &quot;A String&quot;, # The user&#x27;s identifying email address.
304 &quot;name&quot;: &quot;A String&quot;, # The user&#x27;s display name.
305 &quot;photoUrl&quot;: &quot;A String&quot;, # The user&#x27;s photo.
306 },
307 &quot;name&quot;: &quot;A String&quot;, # The name of the file. The file extension is not part of the file name, which can be identified from the type field.
308 &quot;source&quot;: &quot;A String&quot;, # The file content.
309 &quot;type&quot;: &quot;A String&quot;, # The type of the file.
310 &quot;updateTime&quot;: &quot;A String&quot;, # Last modified date timestamp.
311 },
312 ],
313 &quot;scriptId&quot;: &quot;A String&quot;, # The script project&#x27;s Drive ID.
314 }
315
316 x__xgafv: string, V1 error format.
317 Allowed values
318 1 - v1 error format
319 2 - v2 error format
320
321 Returns:
322 An object of the form:
323
324 { # The Content resource.
325 &quot;files&quot;: [ # The list of script project files. One of the files is a script manifest; it must be named &quot;appsscript&quot;, must have type of JSON, and include the manifest configurations for the project.
326 { # An individual file within a script project. A file is a third-party source code created by one or more developers. It can be a server-side JS code, HTML, or a configuration file. Each script project can contain multiple files.
327 &quot;createTime&quot;: &quot;A String&quot;, # Creation date timestamp.
328 &quot;functionSet&quot;: { # A set of functions. No duplicates are permitted. # The defined set of functions in the script file, if any.
329 &quot;values&quot;: [ # A list of functions composing the set.
330 { # Represents a function in a script project.
331 &quot;name&quot;: &quot;A String&quot;, # The function name in the script project.
332 &quot;parameters&quot;: [ # The ordered list of parameter names of the function in the script project.
333 &quot;A String&quot;,
334 ],
335 },
336 ],
337 },
338 &quot;lastModifyUser&quot;: { # A simple user profile resource. # The user who modified the file most recently. The details visible in this object are controlled by the profile visibility settings of the last modifying user.
339 &quot;domain&quot;: &quot;A String&quot;, # The user&#x27;s domain.
340 &quot;email&quot;: &quot;A String&quot;, # The user&#x27;s identifying email address.
341 &quot;name&quot;: &quot;A String&quot;, # The user&#x27;s display name.
342 &quot;photoUrl&quot;: &quot;A String&quot;, # The user&#x27;s photo.
343 },
344 &quot;name&quot;: &quot;A String&quot;, # The name of the file. The file extension is not part of the file name, which can be identified from the type field.
345 &quot;source&quot;: &quot;A String&quot;, # The file content.
346 &quot;type&quot;: &quot;A String&quot;, # The type of the file.
347 &quot;updateTime&quot;: &quot;A String&quot;, # Last modified date timestamp.
348 },
349 ],
350 &quot;scriptId&quot;: &quot;A String&quot;, # The script project&#x27;s Drive ID.
351 }</pre>
352 </div>
353
354 </body></html>