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