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="analytics_v3.html">Google Analytics API</a> . <a href="analytics_v3.management.html">management</a> . <a href="analytics_v3.management.accountUserLinks.html">accountUserLinks</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(accountId, linkId)</a></code></p> 82<p class="firstline">Removes a user from the given account.</p> 83<p class="toc_element"> 84 <code><a href="#insert">insert(accountId, body=None)</a></code></p> 85<p class="firstline">Adds a new user to the given account.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(accountId, max_results=None, start_index=None)</a></code></p> 88<p class="firstline">Lists account-user links for a given account.</p> 89<p class="toc_element"> 90 <code><a href="#update">update(accountId, linkId, body=None)</a></code></p> 91<p class="firstline">Updates permissions for an existing user on the given account.</p> 92<h3>Method Details</h3> 93<div class="method"> 94 <code class="details" id="close">close()</code> 95 <pre>Close httplib2 connections.</pre> 96</div> 97 98<div class="method"> 99 <code class="details" id="delete">delete(accountId, linkId)</code> 100 <pre>Removes a user from the given account. 101 102Args: 103 accountId: string, Account ID to delete the user link for. (required) 104 linkId: string, Link ID to delete the user link for. (required) 105</pre> 106</div> 107 108<div class="method"> 109 <code class="details" id="insert">insert(accountId, body=None)</code> 110 <pre>Adds a new user to the given account. 111 112Args: 113 accountId: string, Account ID to create the user link for. (required) 114 body: object, The request body. 115 The object takes the form of: 116 117{ # JSON template for an Analytics Entity-User Link. Returns permissions that a user has for an entity. 118 "entity": { # Entity for this link. It can be an account, a web property, or a view (profile). 119 "accountRef": { # JSON template for a linked account. # Account for this link. 120 "href": "A String", # Link for this account. 121 "id": "A String", # Account ID. 122 "kind": "analytics#accountRef", # Analytics account reference. 123 "name": "A String", # Account name. 124 }, 125 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link. 126 "accountId": "A String", # Account ID to which this view (profile) belongs. 127 "href": "A String", # Link for this view (profile). 128 "id": "A String", # View (Profile) ID. 129 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs. 130 "kind": "analytics#profileRef", # Analytics view (profile) reference. 131 "name": "A String", # Name of this view (profile). 132 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. 133 }, 134 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link. 135 "accountId": "A String", # Account ID to which this web property belongs. 136 "href": "A String", # Link for this web property. 137 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 138 "internalWebPropertyId": "A String", # Internal ID for this web property. 139 "kind": "analytics#webPropertyRef", # Analytics web property reference. 140 "name": "A String", # Name of this web property. 141 }, 142 }, 143 "id": "A String", # Entity user link ID 144 "kind": "analytics#entityUserLink", # Resource type for entity user link. 145 "permissions": { # Permissions the user has for this entity. 146 "effective": [ # Effective permissions represent all the permissions that a user has for this entity. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent entity. Effective permissions are read-only. 147 "A String", 148 ], 149 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable. 150 "A String", 151 ], 152 }, 153 "selfLink": "A String", # Self link for this resource. 154 "userRef": { # JSON template for a user reference. # User reference. 155 "email": "A String", # Email ID of this user. 156 "id": "A String", # User ID. 157 "kind": "analytics#userRef", 158 }, 159} 160 161 162Returns: 163 An object of the form: 164 165 { # JSON template for an Analytics Entity-User Link. Returns permissions that a user has for an entity. 166 "entity": { # Entity for this link. It can be an account, a web property, or a view (profile). 167 "accountRef": { # JSON template for a linked account. # Account for this link. 168 "href": "A String", # Link for this account. 169 "id": "A String", # Account ID. 170 "kind": "analytics#accountRef", # Analytics account reference. 171 "name": "A String", # Account name. 172 }, 173 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link. 174 "accountId": "A String", # Account ID to which this view (profile) belongs. 175 "href": "A String", # Link for this view (profile). 176 "id": "A String", # View (Profile) ID. 177 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs. 178 "kind": "analytics#profileRef", # Analytics view (profile) reference. 179 "name": "A String", # Name of this view (profile). 180 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. 181 }, 182 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link. 183 "accountId": "A String", # Account ID to which this web property belongs. 184 "href": "A String", # Link for this web property. 185 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 186 "internalWebPropertyId": "A String", # Internal ID for this web property. 187 "kind": "analytics#webPropertyRef", # Analytics web property reference. 188 "name": "A String", # Name of this web property. 189 }, 190 }, 191 "id": "A String", # Entity user link ID 192 "kind": "analytics#entityUserLink", # Resource type for entity user link. 193 "permissions": { # Permissions the user has for this entity. 194 "effective": [ # Effective permissions represent all the permissions that a user has for this entity. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent entity. Effective permissions are read-only. 195 "A String", 196 ], 197 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable. 198 "A String", 199 ], 200 }, 201 "selfLink": "A String", # Self link for this resource. 202 "userRef": { # JSON template for a user reference. # User reference. 203 "email": "A String", # Email ID of this user. 204 "id": "A String", # User ID. 205 "kind": "analytics#userRef", 206 }, 207}</pre> 208</div> 209 210<div class="method"> 211 <code class="details" id="list">list(accountId, max_results=None, start_index=None)</code> 212 <pre>Lists account-user links for a given account. 213 214Args: 215 accountId: string, Account ID to retrieve the user links for. (required) 216 max_results: integer, The maximum number of account-user links to include in this response. 217 start_index: integer, An index of the first account-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. 218 219Returns: 220 An object of the form: 221 222 { # An entity user link collection provides a list of Analytics ACL links Each resource in this collection corresponds to a single link. 223 "items": [ # A list of entity user links. 224 { # JSON template for an Analytics Entity-User Link. Returns permissions that a user has for an entity. 225 "entity": { # Entity for this link. It can be an account, a web property, or a view (profile). 226 "accountRef": { # JSON template for a linked account. # Account for this link. 227 "href": "A String", # Link for this account. 228 "id": "A String", # Account ID. 229 "kind": "analytics#accountRef", # Analytics account reference. 230 "name": "A String", # Account name. 231 }, 232 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link. 233 "accountId": "A String", # Account ID to which this view (profile) belongs. 234 "href": "A String", # Link for this view (profile). 235 "id": "A String", # View (Profile) ID. 236 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs. 237 "kind": "analytics#profileRef", # Analytics view (profile) reference. 238 "name": "A String", # Name of this view (profile). 239 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. 240 }, 241 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link. 242 "accountId": "A String", # Account ID to which this web property belongs. 243 "href": "A String", # Link for this web property. 244 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 245 "internalWebPropertyId": "A String", # Internal ID for this web property. 246 "kind": "analytics#webPropertyRef", # Analytics web property reference. 247 "name": "A String", # Name of this web property. 248 }, 249 }, 250 "id": "A String", # Entity user link ID 251 "kind": "analytics#entityUserLink", # Resource type for entity user link. 252 "permissions": { # Permissions the user has for this entity. 253 "effective": [ # Effective permissions represent all the permissions that a user has for this entity. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent entity. Effective permissions are read-only. 254 "A String", 255 ], 256 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable. 257 "A String", 258 ], 259 }, 260 "selfLink": "A String", # Self link for this resource. 261 "userRef": { # JSON template for a user reference. # User reference. 262 "email": "A String", # Email ID of this user. 263 "id": "A String", # User ID. 264 "kind": "analytics#userRef", 265 }, 266 }, 267 ], 268 "itemsPerPage": 42, # The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. 269 "kind": "analytics#entityUserLinks", # Collection type. 270 "nextLink": "A String", # Next link for this account collection. 271 "previousLink": "A String", # Previous link for this account collection. 272 "startIndex": 42, # The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. 273 "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response. 274}</pre> 275</div> 276 277<div class="method"> 278 <code class="details" id="update">update(accountId, linkId, body=None)</code> 279 <pre>Updates permissions for an existing user on the given account. 280 281Args: 282 accountId: string, Account ID to update the account-user link for. (required) 283 linkId: string, Link ID to update the account-user link for. (required) 284 body: object, The request body. 285 The object takes the form of: 286 287{ # JSON template for an Analytics Entity-User Link. Returns permissions that a user has for an entity. 288 "entity": { # Entity for this link. It can be an account, a web property, or a view (profile). 289 "accountRef": { # JSON template for a linked account. # Account for this link. 290 "href": "A String", # Link for this account. 291 "id": "A String", # Account ID. 292 "kind": "analytics#accountRef", # Analytics account reference. 293 "name": "A String", # Account name. 294 }, 295 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link. 296 "accountId": "A String", # Account ID to which this view (profile) belongs. 297 "href": "A String", # Link for this view (profile). 298 "id": "A String", # View (Profile) ID. 299 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs. 300 "kind": "analytics#profileRef", # Analytics view (profile) reference. 301 "name": "A String", # Name of this view (profile). 302 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. 303 }, 304 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link. 305 "accountId": "A String", # Account ID to which this web property belongs. 306 "href": "A String", # Link for this web property. 307 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 308 "internalWebPropertyId": "A String", # Internal ID for this web property. 309 "kind": "analytics#webPropertyRef", # Analytics web property reference. 310 "name": "A String", # Name of this web property. 311 }, 312 }, 313 "id": "A String", # Entity user link ID 314 "kind": "analytics#entityUserLink", # Resource type for entity user link. 315 "permissions": { # Permissions the user has for this entity. 316 "effective": [ # Effective permissions represent all the permissions that a user has for this entity. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent entity. Effective permissions are read-only. 317 "A String", 318 ], 319 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable. 320 "A String", 321 ], 322 }, 323 "selfLink": "A String", # Self link for this resource. 324 "userRef": { # JSON template for a user reference. # User reference. 325 "email": "A String", # Email ID of this user. 326 "id": "A String", # User ID. 327 "kind": "analytics#userRef", 328 }, 329} 330 331 332Returns: 333 An object of the form: 334 335 { # JSON template for an Analytics Entity-User Link. Returns permissions that a user has for an entity. 336 "entity": { # Entity for this link. It can be an account, a web property, or a view (profile). 337 "accountRef": { # JSON template for a linked account. # Account for this link. 338 "href": "A String", # Link for this account. 339 "id": "A String", # Account ID. 340 "kind": "analytics#accountRef", # Analytics account reference. 341 "name": "A String", # Account name. 342 }, 343 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link. 344 "accountId": "A String", # Account ID to which this view (profile) belongs. 345 "href": "A String", # Link for this view (profile). 346 "id": "A String", # View (Profile) ID. 347 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs. 348 "kind": "analytics#profileRef", # Analytics view (profile) reference. 349 "name": "A String", # Name of this view (profile). 350 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. 351 }, 352 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link. 353 "accountId": "A String", # Account ID to which this web property belongs. 354 "href": "A String", # Link for this web property. 355 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 356 "internalWebPropertyId": "A String", # Internal ID for this web property. 357 "kind": "analytics#webPropertyRef", # Analytics web property reference. 358 "name": "A String", # Name of this web property. 359 }, 360 }, 361 "id": "A String", # Entity user link ID 362 "kind": "analytics#entityUserLink", # Resource type for entity user link. 363 "permissions": { # Permissions the user has for this entity. 364 "effective": [ # Effective permissions represent all the permissions that a user has for this entity. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent entity. Effective permissions are read-only. 365 "A String", 366 ], 367 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable. 368 "A String", 369 ], 370 }, 371 "selfLink": "A String", # Self link for this resource. 372 "userRef": { # JSON template for a user reference. # User reference. 373 "email": "A String", # Email ID of this user. 374 "id": "A String", # User ID. 375 "kind": "analytics#userRef", 376 }, 377}</pre> 378</div> 379 380</body></html>