1<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 75<h1><a href="analyticsadmin_v1alpha.html">Google Analytics Admin API</a> . <a href="analyticsadmin_v1alpha.accounts.html">accounts</a> . <a href="analyticsadmin_v1alpha.accounts.userLinks.html">userLinks</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#audit">audit(parent, body=None, x__xgafv=None)</a></code></p> 79<p class="firstline">Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles. If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs.</p> 80<p class="toc_element"> 81 <code><a href="#audit_next">audit_next(previous_request, previous_response)</a></code></p> 82<p class="firstline">Retrieves the next page of results.</p> 83<p class="toc_element"> 84 <code><a href="#batchCreate">batchCreate(parent, body=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Creates information about multiple users' links to an account or property. This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.</p> 86<p class="toc_element"> 87 <code><a href="#batchDelete">batchDelete(parent, body=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Deletes information about multiple users' links to an account or property.</p> 89<p class="toc_element"> 90 <code><a href="#batchGet">batchGet(parent, names=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Gets information about multiple users' links to an account or property.</p> 92<p class="toc_element"> 93 <code><a href="#batchUpdate">batchUpdate(parent, body=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Updates information about multiple users' links to an account or property.</p> 95<p class="toc_element"> 96 <code><a href="#close">close()</a></code></p> 97<p class="firstline">Close httplib2 connections.</p> 98<p class="toc_element"> 99 <code><a href="#create">create(parent, body=None, notifyNewUser=None, x__xgafv=None)</a></code></p> 100<p class="firstline">Creates a user link on an account or property. If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink.</p> 101<p class="toc_element"> 102 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> 103<p class="firstline">Deletes a user link on an account or property.</p> 104<p class="toc_element"> 105 <code><a href="#get">get(name, x__xgafv=None)</a></code></p> 106<p class="firstline">Gets information about a user's link to an account or property.</p> 107<p class="toc_element"> 108 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 109<p class="firstline">Lists all user links on an account or property.</p> 110<p class="toc_element"> 111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 112<p class="firstline">Retrieves the next page of results.</p> 113<p class="toc_element"> 114 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p> 115<p class="firstline">Updates a user link on an account or property.</p> 116<h3>Method Details</h3> 117<div class="method"> 118 <code class="details" id="audit">audit(parent, body=None, x__xgafv=None)</code> 119 <pre>Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles. If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs. 120 121Args: 122 parent: string, Required. Example format: accounts/1234 (required) 123 body: object, The request body. 124 The object takes the form of: 125 126{ # Request message for AuditUserLinks RPC. 127 "pageSize": 42, # The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 1000 user links will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. 128 "pageToken": "A String", # A page token, received from a previous `AuditUserLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `AuditUserLinks` must match the call that provided the page token. 129} 130 131 x__xgafv: string, V1 error format. 132 Allowed values 133 1 - v1 error format 134 2 - v2 error format 135 136Returns: 137 An object of the form: 138 139 { # Response message for AuditUserLinks RPC. 140 "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. 141 "userLinks": [ # List of AuditUserLinks. These will be ordered stably, but in an arbitrary order. 142 { # Read-only resource used to summarize a principal's effective roles. 143 "directRoles": [ # Roles directly assigned to this user for this entity. Format: predefinedRoles/viewer Excludes roles that are inherited from an account (if this is for a property), group, or organization admin role. 144 "A String", 145 ], 146 "effectiveRoles": [ # Union of all permissions a user has at this account or property (includes direct permissions, group-inherited permissions, etc.). Format: predefinedRoles/viewer 147 "A String", 148 ], 149 "emailAddress": "A String", # Email address of the linked user 150 "name": "A String", # Example format: properties/1234/userLinks/5678 151 }, 152 ], 153}</pre> 154</div> 155 156<div class="method"> 157 <code class="details" id="audit_next">audit_next(previous_request, previous_response)</code> 158 <pre>Retrieves the next page of results. 159 160Args: 161 previous_request: The request for the previous page. (required) 162 previous_response: The response from the request for the previous page. (required) 163 164Returns: 165 A request object that you can call 'execute()' on to request the next 166 page. Returns None if there are no more items in the collection. 167 </pre> 168</div> 169 170<div class="method"> 171 <code class="details" id="batchCreate">batchCreate(parent, body=None, x__xgafv=None)</code> 172 <pre>Creates information about multiple users' links to an account or property. This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created. 173 174Args: 175 parent: string, Required. The account or property that all user links in the request are for. This field is required. The parent field in the CreateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234 (required) 176 body: object, The request body. 177 The object takes the form of: 178 179{ # Request message for BatchCreateUserLinks RPC. 180 "notifyNewUsers": True or False, # Optional. If set, then email the new users notifying them that they've been granted permissions to the resource. Regardless of whether this is set or not, notify_new_user field inside each individual request is ignored. 181 "requests": [ # Required. The requests specifying the user links to create. A maximum of 1000 user links can be created in a batch. 182 { # Request message for CreateUserLink RPC. Users can have multiple email addresses associated with their Google account, and one of these email addresses is the "primary" email address. Any of the email addresses associated with a Google account may be used for a new UserLink, but the returned UserLink will always contain the "primary" email address. As a result, the input and output email address for this request may differ. 183 "notifyNewUser": True or False, # Optional. If set, then email the new user notifying them that they've been granted permissions to the resource. 184 "parent": "A String", # Required. Example format: accounts/1234 185 "userLink": { # A resource message representing a user's permissions on an Account or Property resource. # Required. The user link to create. 186 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 187 "A String", 188 ], 189 "emailAddress": "A String", # Immutable. Email address of the user to link 190 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 191 }, 192 }, 193 ], 194} 195 196 x__xgafv: string, V1 error format. 197 Allowed values 198 1 - v1 error format 199 2 - v2 error format 200 201Returns: 202 An object of the form: 203 204 { # Response message for BatchCreateUserLinks RPC. 205 "userLinks": [ # The user links created. 206 { # A resource message representing a user's permissions on an Account or Property resource. 207 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 208 "A String", 209 ], 210 "emailAddress": "A String", # Immutable. Email address of the user to link 211 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 212 }, 213 ], 214}</pre> 215</div> 216 217<div class="method"> 218 <code class="details" id="batchDelete">batchDelete(parent, body=None, x__xgafv=None)</code> 219 <pre>Deletes information about multiple users' links to an account or property. 220 221Args: 222 parent: string, Required. The account or property that all user links in the request are for. The parent of all values for user link names to delete must match this field. Example format: accounts/1234 (required) 223 body: object, The request body. 224 The object takes the form of: 225 226{ # Request message for BatchDeleteUserLinks RPC. 227 "requests": [ # Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch. 228 { # Request message for DeleteUserLink RPC. 229 "name": "A String", # Required. Example format: accounts/1234/userLinks/5678 230 }, 231 ], 232} 233 234 x__xgafv: string, V1 error format. 235 Allowed values 236 1 - v1 error format 237 2 - v2 error format 238 239Returns: 240 An object of the form: 241 242 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. 243}</pre> 244</div> 245 246<div class="method"> 247 <code class="details" id="batchGet">batchGet(parent, names=None, x__xgafv=None)</code> 248 <pre>Gets information about multiple users' links to an account or property. 249 250Args: 251 parent: string, Required. The account or property that all user links in the request are for. The parent of all provided values for the 'names' field must match this field. Example format: accounts/1234 (required) 252 names: string, Required. The names of the user links to retrieve. A maximum of 1000 user links can be retrieved in a batch. Format: accounts/{accountId}/userLinks/{userLinkId} (repeated) 253 x__xgafv: string, V1 error format. 254 Allowed values 255 1 - v1 error format 256 2 - v2 error format 257 258Returns: 259 An object of the form: 260 261 { # Response message for BatchGetUserLinks RPC. 262 "userLinks": [ # The requested user links. 263 { # A resource message representing a user's permissions on an Account or Property resource. 264 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 265 "A String", 266 ], 267 "emailAddress": "A String", # Immutable. Email address of the user to link 268 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 269 }, 270 ], 271}</pre> 272</div> 273 274<div class="method"> 275 <code class="details" id="batchUpdate">batchUpdate(parent, body=None, x__xgafv=None)</code> 276 <pre>Updates information about multiple users' links to an account or property. 277 278Args: 279 parent: string, Required. The account or property that all user links in the request are for. The parent field in the UpdateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234 (required) 280 body: object, The request body. 281 The object takes the form of: 282 283{ # Request message for BatchUpdateUserLinks RPC. 284 "requests": [ # Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch. 285 { # Request message for UpdateUserLink RPC. 286 "userLink": { # A resource message representing a user's permissions on an Account or Property resource. # Required. The user link to update. 287 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 288 "A String", 289 ], 290 "emailAddress": "A String", # Immutable. Email address of the user to link 291 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 292 }, 293 }, 294 ], 295} 296 297 x__xgafv: string, V1 error format. 298 Allowed values 299 1 - v1 error format 300 2 - v2 error format 301 302Returns: 303 An object of the form: 304 305 { # Response message for BatchUpdateUserLinks RPC. 306 "userLinks": [ # The user links updated. 307 { # A resource message representing a user's permissions on an Account or Property resource. 308 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 309 "A String", 310 ], 311 "emailAddress": "A String", # Immutable. Email address of the user to link 312 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 313 }, 314 ], 315}</pre> 316</div> 317 318<div class="method"> 319 <code class="details" id="close">close()</code> 320 <pre>Close httplib2 connections.</pre> 321</div> 322 323<div class="method"> 324 <code class="details" id="create">create(parent, body=None, notifyNewUser=None, x__xgafv=None)</code> 325 <pre>Creates a user link on an account or property. If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink. 326 327Args: 328 parent: string, Required. Example format: accounts/1234 (required) 329 body: object, The request body. 330 The object takes the form of: 331 332{ # A resource message representing a user's permissions on an Account or Property resource. 333 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 334 "A String", 335 ], 336 "emailAddress": "A String", # Immutable. Email address of the user to link 337 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 338} 339 340 notifyNewUser: boolean, Optional. If set, then email the new user notifying them that they've been granted permissions to the resource. 341 x__xgafv: string, V1 error format. 342 Allowed values 343 1 - v1 error format 344 2 - v2 error format 345 346Returns: 347 An object of the form: 348 349 { # A resource message representing a user's permissions on an Account or Property resource. 350 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 351 "A String", 352 ], 353 "emailAddress": "A String", # Immutable. Email address of the user to link 354 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 355}</pre> 356</div> 357 358<div class="method"> 359 <code class="details" id="delete">delete(name, x__xgafv=None)</code> 360 <pre>Deletes a user link on an account or property. 361 362Args: 363 name: string, Required. Example format: accounts/1234/userLinks/5678 (required) 364 x__xgafv: string, V1 error format. 365 Allowed values 366 1 - v1 error format 367 2 - v2 error format 368 369Returns: 370 An object of the form: 371 372 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. 373}</pre> 374</div> 375 376<div class="method"> 377 <code class="details" id="get">get(name, x__xgafv=None)</code> 378 <pre>Gets information about a user's link to an account or property. 379 380Args: 381 name: string, Required. Example format: accounts/1234/userLinks/5678 (required) 382 x__xgafv: string, V1 error format. 383 Allowed values 384 1 - v1 error format 385 2 - v2 error format 386 387Returns: 388 An object of the form: 389 390 { # A resource message representing a user's permissions on an Account or Property resource. 391 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 392 "A String", 393 ], 394 "emailAddress": "A String", # Immutable. Email address of the user to link 395 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 396}</pre> 397</div> 398 399<div class="method"> 400 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> 401 <pre>Lists all user links on an account or property. 402 403Args: 404 parent: string, Required. Example format: accounts/1234 (required) 405 pageSize: integer, The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500. 406 pageToken: string, A page token, received from a previous `ListUserLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUserLinks` must match the call that provided the page token. 407 x__xgafv: string, V1 error format. 408 Allowed values 409 1 - v1 error format 410 2 - v2 error format 411 412Returns: 413 An object of the form: 414 415 { # Response message for ListUserLinks RPC. 416 "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. 417 "userLinks": [ # List of UserLinks. These will be ordered stably, but in an arbitrary order. 418 { # A resource message representing a user's permissions on an Account or Property resource. 419 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 420 "A String", 421 ], 422 "emailAddress": "A String", # Immutable. Email address of the user to link 423 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 424 }, 425 ], 426}</pre> 427</div> 428 429<div class="method"> 430 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 431 <pre>Retrieves the next page of results. 432 433Args: 434 previous_request: The request for the previous page. (required) 435 previous_response: The response from the request for the previous page. (required) 436 437Returns: 438 A request object that you can call 'execute()' on to request the next 439 page. Returns None if there are no more items in the collection. 440 </pre> 441</div> 442 443<div class="method"> 444 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code> 445 <pre>Updates a user link on an account or property. 446 447Args: 448 name: string, Output only. Example format: properties/1234/userLinks/5678 (required) 449 body: object, The request body. 450 The object takes the form of: 451 452{ # A resource message representing a user's permissions on an Account or Property resource. 453 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 454 "A String", 455 ], 456 "emailAddress": "A String", # Immutable. Email address of the user to link 457 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 458} 459 460 x__xgafv: string, V1 error format. 461 Allowed values 462 1 - v1 error format 463 2 - v2 error format 464 465Returns: 466 An object of the form: 467 468 { # A resource message representing a user's permissions on an Account or Property resource. 469 "directRoles": [ # Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. 470 "A String", 471 ], 472 "emailAddress": "A String", # Immutable. Email address of the user to link 473 "name": "A String", # Output only. Example format: properties/1234/userLinks/5678 474}</pre> 475</div> 476 477</body></html>