Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 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="drive_v3.html">Drive API</a> . <a href="drive_v3.permissions.html">permissions</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 78 | <code><a href="#create">create(fileId, body, sendNotificationEmail=None, supportsTeamDrives=None, transferOwnership=None, emailMessage=None)</a></code></p> |
| 79 | <p class="firstline">Creates a permission for a file or Team Drive.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 80 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 81 | <code><a href="#delete">delete(fileId, permissionId, supportsTeamDrives=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 82 | <p class="firstline">Deletes a permission.</p> |
| 83 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 84 | <code><a href="#get">get(fileId, permissionId, supportsTeamDrives=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 85 | <p class="firstline">Gets a permission by ID.</p> |
| 86 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 87 | <code><a href="#list">list(fileId, pageToken=None, supportsTeamDrives=None, pageSize=None)</a></code></p> |
| 88 | <p class="firstline">Lists a file's or Team Drive's permissions.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 89 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 90 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 91 | <p class="firstline">Retrieves the next page of results.</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#update">update(fileId, permissionId, body, removeExpiration=None, supportsTeamDrives=None, transferOwnership=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 94 | <p class="firstline">Updates a permission with patch semantics.</p> |
| 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 97 | <code class="details" id="create">create(fileId, body, sendNotificationEmail=None, supportsTeamDrives=None, transferOwnership=None, emailMessage=None)</code> |
| 98 | <pre>Creates a permission for a file or Team Drive. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 99 | |
| 100 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 101 | fileId: string, The ID of the file or Team Drive. (required) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 102 | body: object, The request body. (required) |
| 103 | The object takes the form of: |
| 104 | |
| 105 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
| 106 | "domain": "A String", # The domain to which this permission refers. |
| 107 | "displayName": "A String", # A displayable name for users, groups or domains. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 108 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 109 | { |
| 110 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 111 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 112 | # - organizer |
| 113 | # - writer |
| 114 | # - commenter |
| 115 | # - reader |
| 116 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 117 | # - file |
| 118 | # - |
| 119 | # - member |
| 120 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 121 | }, |
| 122 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 123 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 124 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 125 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 126 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 127 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
| 128 | # - organizer |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 129 | # - owner |
| 130 | # - writer |
| 131 | # - commenter |
| 132 | # - reader |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 133 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 134 | # - They can only be set on user and group permissions |
| 135 | # - The time must be in the future |
| 136 | # - The time cannot be more than a year in the future |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 137 | "type": "A String", # The type of the grantee. Valid values are: |
| 138 | # - user |
| 139 | # - group |
| 140 | # - domain |
| 141 | # - anyone |
| 142 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. |
| 143 | } |
| 144 | |
| 145 | sendNotificationEmail: boolean, Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 146 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 147 | transferOwnership: boolean, Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. |
| 148 | emailMessage: string, A custom message to include in the notification email. |
| 149 | |
| 150 | Returns: |
| 151 | An object of the form: |
| 152 | |
| 153 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
| 154 | "domain": "A String", # The domain to which this permission refers. |
| 155 | "displayName": "A String", # A displayable name for users, groups or domains. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 156 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 157 | { |
| 158 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 159 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 160 | # - organizer |
| 161 | # - writer |
| 162 | # - commenter |
| 163 | # - reader |
| 164 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 165 | # - file |
| 166 | # - |
| 167 | # - member |
| 168 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 169 | }, |
| 170 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 171 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 172 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 173 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 174 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 175 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
| 176 | # - organizer |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 177 | # - owner |
| 178 | # - writer |
| 179 | # - commenter |
| 180 | # - reader |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 181 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 182 | # - They can only be set on user and group permissions |
| 183 | # - The time must be in the future |
| 184 | # - The time cannot be more than a year in the future |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 185 | "type": "A String", # The type of the grantee. Valid values are: |
| 186 | # - user |
| 187 | # - group |
| 188 | # - domain |
| 189 | # - anyone |
| 190 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. |
| 191 | }</pre> |
| 192 | </div> |
| 193 | |
| 194 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 195 | <code class="details" id="delete">delete(fileId, permissionId, supportsTeamDrives=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 196 | <pre>Deletes a permission. |
| 197 | |
| 198 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 199 | fileId: string, The ID of the file or Team Drive. (required) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 200 | permissionId: string, The ID of the permission. (required) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 201 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 202 | </pre> |
| 203 | </div> |
| 204 | |
| 205 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 206 | <code class="details" id="get">get(fileId, permissionId, supportsTeamDrives=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 207 | <pre>Gets a permission by ID. |
| 208 | |
| 209 | Args: |
| 210 | fileId: string, The ID of the file. (required) |
| 211 | permissionId: string, The ID of the permission. (required) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 212 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 213 | |
| 214 | Returns: |
| 215 | An object of the form: |
| 216 | |
| 217 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
| 218 | "domain": "A String", # The domain to which this permission refers. |
| 219 | "displayName": "A String", # A displayable name for users, groups or domains. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 220 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 221 | { |
| 222 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 223 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 224 | # - organizer |
| 225 | # - writer |
| 226 | # - commenter |
| 227 | # - reader |
| 228 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 229 | # - file |
| 230 | # - |
| 231 | # - member |
| 232 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 233 | }, |
| 234 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 235 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 236 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 237 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 238 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 239 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
| 240 | # - organizer |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 241 | # - owner |
| 242 | # - writer |
| 243 | # - commenter |
| 244 | # - reader |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 245 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 246 | # - They can only be set on user and group permissions |
| 247 | # - The time must be in the future |
| 248 | # - The time cannot be more than a year in the future |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 249 | "type": "A String", # The type of the grantee. Valid values are: |
| 250 | # - user |
| 251 | # - group |
| 252 | # - domain |
| 253 | # - anyone |
| 254 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. |
| 255 | }</pre> |
| 256 | </div> |
| 257 | |
| 258 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 259 | <code class="details" id="list">list(fileId, pageToken=None, supportsTeamDrives=None, pageSize=None)</code> |
| 260 | <pre>Lists a file's or Team Drive's permissions. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 261 | |
| 262 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 263 | fileId: string, The ID of the file or Team Drive. (required) |
| 264 | pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. |
| 265 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
| 266 | pageSize: integer, The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire list will be returned. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 267 | |
| 268 | Returns: |
| 269 | An object of the form: |
| 270 | |
| 271 | { # A list of permissions for a file. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 272 | "nextPageToken": "A String", # The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 273 | "kind": "drive#permissionList", # Identifies what kind of resource this is. Value: the fixed string "drive#permissionList". |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 274 | "permissions": [ # The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 275 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
| 276 | "domain": "A String", # The domain to which this permission refers. |
| 277 | "displayName": "A String", # A displayable name for users, groups or domains. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 278 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 279 | { |
| 280 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 281 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 282 | # - organizer |
| 283 | # - writer |
| 284 | # - commenter |
| 285 | # - reader |
| 286 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 287 | # - file |
| 288 | # - |
| 289 | # - member |
| 290 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 291 | }, |
| 292 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 293 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 294 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 295 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 296 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 297 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
| 298 | # - organizer |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 299 | # - owner |
| 300 | # - writer |
| 301 | # - commenter |
| 302 | # - reader |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 303 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 304 | # - They can only be set on user and group permissions |
| 305 | # - The time must be in the future |
| 306 | # - The time cannot be more than a year in the future |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 307 | "type": "A String", # The type of the grantee. Valid values are: |
| 308 | # - user |
| 309 | # - group |
| 310 | # - domain |
| 311 | # - anyone |
| 312 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. |
| 313 | }, |
| 314 | ], |
| 315 | }</pre> |
| 316 | </div> |
| 317 | |
| 318 | <div class="method"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 319 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 320 | <pre>Retrieves the next page of results. |
| 321 | |
| 322 | Args: |
| 323 | previous_request: The request for the previous page. (required) |
| 324 | previous_response: The response from the request for the previous page. (required) |
| 325 | |
| 326 | Returns: |
| 327 | A request object that you can call 'execute()' on to request the next |
| 328 | page. Returns None if there are no more items in the collection. |
| 329 | </pre> |
| 330 | </div> |
| 331 | |
| 332 | <div class="method"> |
| 333 | <code class="details" id="update">update(fileId, permissionId, body, removeExpiration=None, supportsTeamDrives=None, transferOwnership=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 334 | <pre>Updates a permission with patch semantics. |
| 335 | |
| 336 | Args: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 337 | fileId: string, The ID of the file or Team Drive. (required) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 338 | permissionId: string, The ID of the permission. (required) |
| 339 | body: object, The request body. (required) |
| 340 | The object takes the form of: |
| 341 | |
| 342 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
| 343 | "domain": "A String", # The domain to which this permission refers. |
| 344 | "displayName": "A String", # A displayable name for users, groups or domains. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 345 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 346 | { |
| 347 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 348 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 349 | # - organizer |
| 350 | # - writer |
| 351 | # - commenter |
| 352 | # - reader |
| 353 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 354 | # - file |
| 355 | # - |
| 356 | # - member |
| 357 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 358 | }, |
| 359 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 360 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 361 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 362 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 363 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 364 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
| 365 | # - organizer |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 366 | # - owner |
| 367 | # - writer |
| 368 | # - commenter |
| 369 | # - reader |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 370 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 371 | # - They can only be set on user and group permissions |
| 372 | # - The time must be in the future |
| 373 | # - The time cannot be more than a year in the future |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 374 | "type": "A String", # The type of the grantee. Valid values are: |
| 375 | # - user |
| 376 | # - group |
| 377 | # - domain |
| 378 | # - anyone |
| 379 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. |
| 380 | } |
| 381 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 382 | removeExpiration: boolean, Whether to remove the expiration date. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 383 | supportsTeamDrives: boolean, Whether the requesting application supports Team Drives. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 384 | transferOwnership: boolean, Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. |
| 385 | |
| 386 | Returns: |
| 387 | An object of the form: |
| 388 | |
| 389 | { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. |
| 390 | "domain": "A String", # The domain to which this permission refers. |
| 391 | "displayName": "A String", # A displayable name for users, groups or domains. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 392 | "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. |
| 393 | { |
| 394 | "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. |
| 395 | "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: |
| 396 | # - organizer |
| 397 | # - writer |
| 398 | # - commenter |
| 399 | # - reader |
| 400 | "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: |
| 401 | # - file |
| 402 | # - |
| 403 | # - member |
| 404 | "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. |
| 405 | }, |
| 406 | ], |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 407 | "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 408 | "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 409 | "emailAddress": "A String", # The email address of the user or group to which this permission refers. |
| 410 | "photoLink": "A String", # A link to the user's profile photo, if available. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 411 | "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: |
| 412 | # - organizer |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 413 | # - owner |
| 414 | # - writer |
| 415 | # - commenter |
| 416 | # - reader |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 417 | "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: |
| 418 | # - They can only be set on user and group permissions |
| 419 | # - The time must be in the future |
| 420 | # - The time cannot be more than a year in the future |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 421 | "type": "A String", # The type of the grantee. Valid values are: |
| 422 | # - user |
| 423 | # - group |
| 424 | # - domain |
| 425 | # - anyone |
| 426 | "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. |
| 427 | }</pre> |
| 428 | </div> |
| 429 | |
| 430 | </body></html> |