blob: 238201bfc1b1b6fea24b5812dccdc744e2e7cad9 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="appsactivity_v1.html">Drive Activity API</a> . <a href="appsactivity_v1.activities.html">activities</a></h1>
Craig Citro065b5302014-08-14 00:47:23 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#list">list(drive_ancestorId=None, drive_fileId=None, groupingStrategy=None, pageSize=None, pageToken=None, source=None, userId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Returns a list of activities visible to the current logged in user. Visible activities are determined by the visibility settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter.</p>
Craig Citro065b5302014-08-14 00:47:23 -070080<p class="toc_element">
81 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<h3>Method Details</h3>
84<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -070085 <code class="details" id="list">list(drive_ancestorId=None, drive_fileId=None, groupingStrategy=None, pageSize=None, pageToken=None, source=None, userId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086 <pre>Returns a list of activities visible to the current logged in user. Visible activities are determined by the visibility settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter.
Craig Citro065b5302014-08-14 00:47:23 -070087
88Args:
Bu Sun Kim65020912020-05-20 12:08:20 -070089 drive_ancestorId: string, Identifies the Drive folder containing the items for which to return activities.
90 drive_fileId: string, Identifies the Drive item to return activities for.
Craig Citro065b5302014-08-14 00:47:23 -070091 groupingStrategy: string, Indicates the strategy to use when grouping singleEvents items in the associated combinedEvent object.
92 Allowed values
93 driveUi -
94 none -
Bu Sun Kim65020912020-05-20 12:08:20 -070095 pageSize: integer, The maximum number of events to return on a page. The response includes a continuation token if there are more events.
Craig Citro065b5302014-08-14 00:47:23 -070096 pageToken: string, A token to retrieve a specific page of results.
Bu Sun Kim65020912020-05-20 12:08:20 -070097 source: string, The Google service from which to return activities. Possible values of source are:
98- drive.google.com
99 userId: string, The ID used for ACL checks (does not filter the resulting event list by the assigned value). Use the special value me to indicate the currently authenticated user.
Craig Citro065b5302014-08-14 00:47:23 -0700100
101Returns:
102 An object of the form:
103
104 { # The response from the list request. Contains a list of activities and a token to retrieve the next page of results.
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 &quot;activities&quot;: [ # List of activities.
Craig Citro065b5302014-08-14 00:47:23 -0700106 { # An Activity resource is a combined view of multiple events. An activity has a list of individual events and a combined view of the common fields among all events.
Bu Sun Kim65020912020-05-20 12:08:20 -0700107 &quot;combinedEvent&quot;: { # Represents the changes associated with an action taken by a user. # The fields common to all of the singleEvents that make up the Activity.
108 &quot;additionalEventTypes&quot;: [ # Additional event types. Some events may have multiple types when multiple actions are part of a single event. For example, creating a document, renaming it, and sharing it may be part of a single file-creation event.
109 &quot;A String&quot;,
Craig Citro065b5302014-08-14 00:47:23 -0700110 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 &quot;eventTimeMillis&quot;: &quot;A String&quot;, # The time at which the event occurred formatted as Unix time in milliseconds.
112 &quot;fromUserDeletion&quot;: True or False, # Whether this event is caused by a user being deleted.
113 &quot;move&quot;: { # Contains information about changes in an object&#x27;s parents as a result of a move type event. # Extra information for move type events, such as changes in an object&#x27;s parents.
114 &quot;addedParents&quot;: [ # The added parent(s).
Craig Citro065b5302014-08-14 00:47:23 -0700115 { # Contains information about a parent object. For example, a folder in Drive is a parent for all files within it.
Bu Sun Kim65020912020-05-20 12:08:20 -0700116 &quot;id&quot;: &quot;A String&quot;, # The parent&#x27;s ID.
117 &quot;isRoot&quot;: True or False, # Whether this is the root folder.
118 &quot;title&quot;: &quot;A String&quot;, # The parent&#x27;s title.
Craig Citro065b5302014-08-14 00:47:23 -0700119 },
120 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;removedParents&quot;: [ # The removed parent(s).
Craig Citro065b5302014-08-14 00:47:23 -0700122 { # Contains information about a parent object. For example, a folder in Drive is a parent for all files within it.
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 &quot;id&quot;: &quot;A String&quot;, # The parent&#x27;s ID.
124 &quot;isRoot&quot;: True or False, # Whether this is the root folder.
125 &quot;title&quot;: &quot;A String&quot;, # The parent&#x27;s title.
Craig Citro065b5302014-08-14 00:47:23 -0700126 },
127 ],
128 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 &quot;permissionChanges&quot;: [ # Extra information for permissionChange type events, such as the user or group the new permission applies to.
130 { # Contains information about a Drive object&#x27;s permissions that changed as a result of a permissionChange type event.
131 &quot;addedPermissions&quot;: [ # Lists all Permission objects added.
Craig Citro065b5302014-08-14 00:47:23 -0700132 { # Contains information about the permissions and type of access allowed with regards to a Google Drive object. This is a subset of the fields contained in a corresponding Drive Permissions object.
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 &quot;name&quot;: &quot;A String&quot;, # The name of the user or group the permission applies to.
134 &quot;permissionId&quot;: &quot;A String&quot;, # The ID for this permission. Corresponds to the Drive API&#x27;s permission ID returned as part of the Drive Permissions resource.
135 &quot;role&quot;: &quot;A String&quot;, # Indicates the Google Drive permissions role. The role determines a user&#x27;s ability to read, write, or comment on the file.
136 &quot;type&quot;: &quot;A String&quot;, # Indicates how widely permissions are granted.
137 &quot;user&quot;: { # A representation of a user. # The user&#x27;s information if the type is USER.
138 &quot;isDeleted&quot;: True or False, # A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted.
139 &quot;isMe&quot;: True or False, # Whether the user is the authenticated user.
140 &quot;name&quot;: &quot;A String&quot;, # The displayable name of the user.
141 &quot;permissionId&quot;: &quot;A String&quot;, # The permission ID associated with this user. Equivalent to the Drive API&#x27;s permission ID for this user, returned as part of the Drive Permissions resource.
142 &quot;photo&quot;: { # Photo information for a user. # The profile photo of the user. Not present if the user has no profile photo.
143 &quot;url&quot;: &quot;A String&quot;, # The URL of the photo.
Craig Citro065b5302014-08-14 00:47:23 -0700144 },
Craig Citro065b5302014-08-14 00:47:23 -0700145 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;withLink&quot;: True or False, # Whether the permission requires a link to the file.
Craig Citro065b5302014-08-14 00:47:23 -0700147 },
148 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 &quot;removedPermissions&quot;: [ # Lists all Permission objects removed.
Craig Citro065b5302014-08-14 00:47:23 -0700150 { # Contains information about the permissions and type of access allowed with regards to a Google Drive object. This is a subset of the fields contained in a corresponding Drive Permissions object.
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 &quot;name&quot;: &quot;A String&quot;, # The name of the user or group the permission applies to.
152 &quot;permissionId&quot;: &quot;A String&quot;, # The ID for this permission. Corresponds to the Drive API&#x27;s permission ID returned as part of the Drive Permissions resource.
153 &quot;role&quot;: &quot;A String&quot;, # Indicates the Google Drive permissions role. The role determines a user&#x27;s ability to read, write, or comment on the file.
154 &quot;type&quot;: &quot;A String&quot;, # Indicates how widely permissions are granted.
155 &quot;user&quot;: { # A representation of a user. # The user&#x27;s information if the type is USER.
156 &quot;isDeleted&quot;: True or False, # A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted.
157 &quot;isMe&quot;: True or False, # Whether the user is the authenticated user.
158 &quot;name&quot;: &quot;A String&quot;, # The displayable name of the user.
159 &quot;permissionId&quot;: &quot;A String&quot;, # The permission ID associated with this user. Equivalent to the Drive API&#x27;s permission ID for this user, returned as part of the Drive Permissions resource.
160 &quot;photo&quot;: { # Photo information for a user. # The profile photo of the user. Not present if the user has no profile photo.
161 &quot;url&quot;: &quot;A String&quot;, # The URL of the photo.
Craig Citro065b5302014-08-14 00:47:23 -0700162 },
Craig Citro065b5302014-08-14 00:47:23 -0700163 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &quot;withLink&quot;: True or False, # Whether the permission requires a link to the file.
Craig Citro065b5302014-08-14 00:47:23 -0700165 },
166 ],
167 },
168 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 &quot;primaryEventType&quot;: &quot;A String&quot;, # The main type of event that occurred.
170 &quot;rename&quot;: { # Contains information about a renametype event. # Extra information for rename type events, such as the old and new names.
171 &quot;newTitle&quot;: &quot;A String&quot;, # The new title.
172 &quot;oldTitle&quot;: &quot;A String&quot;, # The old title.
Craig Citro065b5302014-08-14 00:47:23 -0700173 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700174 &quot;target&quot;: { # Information about the object modified by the event. # Information specific to the Target object modified by the event.
175 &quot;id&quot;: &quot;A String&quot;, # The ID of the target. For example, in Google Drive, this is the file or folder ID.
176 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the target.
177 &quot;name&quot;: &quot;A String&quot;, # The name of the target. For example, in Google Drive, this is the title of the file.
178 },
179 &quot;user&quot;: { # A representation of a user. # Represents the user responsible for the event.
180 &quot;isDeleted&quot;: True or False, # A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted.
181 &quot;isMe&quot;: True or False, # Whether the user is the authenticated user.
182 &quot;name&quot;: &quot;A String&quot;, # The displayable name of the user.
183 &quot;permissionId&quot;: &quot;A String&quot;, # The permission ID associated with this user. Equivalent to the Drive API&#x27;s permission ID for this user, returned as part of the Drive Permissions resource.
184 &quot;photo&quot;: { # Photo information for a user. # The profile photo of the user. Not present if the user has no profile photo.
185 &quot;url&quot;: &quot;A String&quot;, # The URL of the photo.
186 },
187 },
Craig Citro065b5302014-08-14 00:47:23 -0700188 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700189 &quot;singleEvents&quot;: [ # A list of all the Events that make up the Activity.
Craig Citro065b5302014-08-14 00:47:23 -0700190 { # Represents the changes associated with an action taken by a user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700191 &quot;additionalEventTypes&quot;: [ # Additional event types. Some events may have multiple types when multiple actions are part of a single event. For example, creating a document, renaming it, and sharing it may be part of a single file-creation event.
192 &quot;A String&quot;,
Craig Citro065b5302014-08-14 00:47:23 -0700193 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700194 &quot;eventTimeMillis&quot;: &quot;A String&quot;, # The time at which the event occurred formatted as Unix time in milliseconds.
195 &quot;fromUserDeletion&quot;: True or False, # Whether this event is caused by a user being deleted.
196 &quot;move&quot;: { # Contains information about changes in an object&#x27;s parents as a result of a move type event. # Extra information for move type events, such as changes in an object&#x27;s parents.
197 &quot;addedParents&quot;: [ # The added parent(s).
Craig Citro065b5302014-08-14 00:47:23 -0700198 { # Contains information about a parent object. For example, a folder in Drive is a parent for all files within it.
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 &quot;id&quot;: &quot;A String&quot;, # The parent&#x27;s ID.
200 &quot;isRoot&quot;: True or False, # Whether this is the root folder.
201 &quot;title&quot;: &quot;A String&quot;, # The parent&#x27;s title.
Craig Citro065b5302014-08-14 00:47:23 -0700202 },
203 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &quot;removedParents&quot;: [ # The removed parent(s).
Craig Citro065b5302014-08-14 00:47:23 -0700205 { # Contains information about a parent object. For example, a folder in Drive is a parent for all files within it.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;id&quot;: &quot;A String&quot;, # The parent&#x27;s ID.
207 &quot;isRoot&quot;: True or False, # Whether this is the root folder.
208 &quot;title&quot;: &quot;A String&quot;, # The parent&#x27;s title.
Craig Citro065b5302014-08-14 00:47:23 -0700209 },
210 ],
211 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 &quot;permissionChanges&quot;: [ # Extra information for permissionChange type events, such as the user or group the new permission applies to.
213 { # Contains information about a Drive object&#x27;s permissions that changed as a result of a permissionChange type event.
214 &quot;addedPermissions&quot;: [ # Lists all Permission objects added.
Craig Citro065b5302014-08-14 00:47:23 -0700215 { # Contains information about the permissions and type of access allowed with regards to a Google Drive object. This is a subset of the fields contained in a corresponding Drive Permissions object.
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 &quot;name&quot;: &quot;A String&quot;, # The name of the user or group the permission applies to.
217 &quot;permissionId&quot;: &quot;A String&quot;, # The ID for this permission. Corresponds to the Drive API&#x27;s permission ID returned as part of the Drive Permissions resource.
218 &quot;role&quot;: &quot;A String&quot;, # Indicates the Google Drive permissions role. The role determines a user&#x27;s ability to read, write, or comment on the file.
219 &quot;type&quot;: &quot;A String&quot;, # Indicates how widely permissions are granted.
220 &quot;user&quot;: { # A representation of a user. # The user&#x27;s information if the type is USER.
221 &quot;isDeleted&quot;: True or False, # A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted.
222 &quot;isMe&quot;: True or False, # Whether the user is the authenticated user.
223 &quot;name&quot;: &quot;A String&quot;, # The displayable name of the user.
224 &quot;permissionId&quot;: &quot;A String&quot;, # The permission ID associated with this user. Equivalent to the Drive API&#x27;s permission ID for this user, returned as part of the Drive Permissions resource.
225 &quot;photo&quot;: { # Photo information for a user. # The profile photo of the user. Not present if the user has no profile photo.
226 &quot;url&quot;: &quot;A String&quot;, # The URL of the photo.
Craig Citro065b5302014-08-14 00:47:23 -0700227 },
Craig Citro065b5302014-08-14 00:47:23 -0700228 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 &quot;withLink&quot;: True or False, # Whether the permission requires a link to the file.
Craig Citro065b5302014-08-14 00:47:23 -0700230 },
231 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700232 &quot;removedPermissions&quot;: [ # Lists all Permission objects removed.
Craig Citro065b5302014-08-14 00:47:23 -0700233 { # Contains information about the permissions and type of access allowed with regards to a Google Drive object. This is a subset of the fields contained in a corresponding Drive Permissions object.
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 &quot;name&quot;: &quot;A String&quot;, # The name of the user or group the permission applies to.
235 &quot;permissionId&quot;: &quot;A String&quot;, # The ID for this permission. Corresponds to the Drive API&#x27;s permission ID returned as part of the Drive Permissions resource.
236 &quot;role&quot;: &quot;A String&quot;, # Indicates the Google Drive permissions role. The role determines a user&#x27;s ability to read, write, or comment on the file.
237 &quot;type&quot;: &quot;A String&quot;, # Indicates how widely permissions are granted.
238 &quot;user&quot;: { # A representation of a user. # The user&#x27;s information if the type is USER.
239 &quot;isDeleted&quot;: True or False, # A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted.
240 &quot;isMe&quot;: True or False, # Whether the user is the authenticated user.
241 &quot;name&quot;: &quot;A String&quot;, # The displayable name of the user.
242 &quot;permissionId&quot;: &quot;A String&quot;, # The permission ID associated with this user. Equivalent to the Drive API&#x27;s permission ID for this user, returned as part of the Drive Permissions resource.
243 &quot;photo&quot;: { # Photo information for a user. # The profile photo of the user. Not present if the user has no profile photo.
244 &quot;url&quot;: &quot;A String&quot;, # The URL of the photo.
Craig Citro065b5302014-08-14 00:47:23 -0700245 },
Craig Citro065b5302014-08-14 00:47:23 -0700246 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 &quot;withLink&quot;: True or False, # Whether the permission requires a link to the file.
Craig Citro065b5302014-08-14 00:47:23 -0700248 },
249 ],
250 },
251 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;primaryEventType&quot;: &quot;A String&quot;, # The main type of event that occurred.
253 &quot;rename&quot;: { # Contains information about a renametype event. # Extra information for rename type events, such as the old and new names.
254 &quot;newTitle&quot;: &quot;A String&quot;, # The new title.
255 &quot;oldTitle&quot;: &quot;A String&quot;, # The old title.
Craig Citro065b5302014-08-14 00:47:23 -0700256 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 &quot;target&quot;: { # Information about the object modified by the event. # Information specific to the Target object modified by the event.
258 &quot;id&quot;: &quot;A String&quot;, # The ID of the target. For example, in Google Drive, this is the file or folder ID.
259 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the target.
260 &quot;name&quot;: &quot;A String&quot;, # The name of the target. For example, in Google Drive, this is the title of the file.
261 },
262 &quot;user&quot;: { # A representation of a user. # Represents the user responsible for the event.
263 &quot;isDeleted&quot;: True or False, # A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted.
264 &quot;isMe&quot;: True or False, # Whether the user is the authenticated user.
265 &quot;name&quot;: &quot;A String&quot;, # The displayable name of the user.
266 &quot;permissionId&quot;: &quot;A String&quot;, # The permission ID associated with this user. Equivalent to the Drive API&#x27;s permission ID for this user, returned as part of the Drive Permissions resource.
267 &quot;photo&quot;: { # Photo information for a user. # The profile photo of the user. Not present if the user has no profile photo.
268 &quot;url&quot;: &quot;A String&quot;, # The URL of the photo.
269 },
270 },
Craig Citro065b5302014-08-14 00:47:23 -0700271 },
272 ],
273 },
274 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token for the next page of results.
Craig Citro065b5302014-08-14 00:47:23 -0700276 }</pre>
277</div>
278
279<div class="method">
280 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
281 <pre>Retrieves the next page of results.
282
283Args:
284 previous_request: The request for the previous page. (required)
285 previous_response: The response from the request for the previous page. (required)
286
287Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citro065b5302014-08-14 00:47:23 -0700289 page. Returns None if there are no more items in the collection.
290 </pre>
291</div>
292
293</body></html>