blob: 1f482b2817b52d16e40fde898bebeb51da29ca0d [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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.profileUserLinks.html">profileUserLinks</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(accountId, webPropertyId, profileId, linkId)</a></code></p>
79<p class="firstline">Removes a user from the given view (profile).</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#insert">insert(accountId, webPropertyId, profileId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040082<p class="firstline">Adds a new user to the given view (profile).</p>
83<p class="toc_element">
84 <code><a href="#list">list(accountId, webPropertyId, profileId, max_results=None, start_index=None)</a></code></p>
85<p class="firstline">Lists profile-user links for a given view (profile).</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#update">update(accountId, webPropertyId, profileId, linkId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040088<p class="firstline">Updates permissions for an existing user on the given view (profile).</p>
89<h3>Method Details</h3>
90<div class="method">
91 <code class="details" id="delete">delete(accountId, webPropertyId, profileId, linkId)</code>
92 <pre>Removes a user from the given view (profile).
93
94Args:
95 accountId: string, Account ID to delete the user link for. (required)
96 webPropertyId: string, Web Property ID to delete the user link for. (required)
97 profileId: string, View (Profile) ID to delete the user link for. (required)
98 linkId: string, Link ID to delete the user link for. (required)
99</pre>
100</div>
101
102<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 <code class="details" id="insert">insert(accountId, webPropertyId, profileId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400104 <pre>Adds a new user to the given view (profile).
105
106Args:
107 accountId: string, Account ID to create the user link for. (required)
108 webPropertyId: string, Web Property ID to create the user link for. (required)
109 profileId: string, View (Profile) ID to create the user link for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700110 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400111 The object takes the form of:
112
113{ # JSON template for an Analytics Entity-User Link. Returns permissions that a user has for an entity.
114 "kind": "analytics#entityUserLink", # Resource type for entity user link.
115 "entity": { # Entity for this link. It can be an account, a web property, or a view (profile).
116 "accountRef": { # JSON template for a linked account. # Account for this link.
117 "kind": "analytics#accountRef", # Analytics account reference.
118 "href": "A String", # Link for this account.
John Asmuth614db982014-04-24 15:46:26 -0400119 "name": "A String", # Account name.
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 "id": "A String", # Account ID.
John Asmuth614db982014-04-24 15:46:26 -0400121 },
122 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link.
123 "kind": "analytics#profileRef", # Analytics view (profile) reference.
124 "name": "A String", # Name of this view (profile).
125 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs.
126 "href": "A String", # Link for this view (profile).
127 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs.
128 "id": "A String", # View (Profile) ID.
129 "accountId": "A String", # Account ID to which this view (profile) belongs.
130 },
131 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link.
132 "kind": "analytics#webPropertyRef", # Analytics web property reference.
133 "name": "A String", # Name of this web property.
134 "internalWebPropertyId": "A String", # Internal ID for this web property.
135 "href": "A String", # Link for this web property.
136 "id": "A String", # Web property ID of the form UA-XXXXX-YY.
137 "accountId": "A String", # Account ID to which this web property belongs.
138 },
139 },
140 "userRef": { # JSON template for a user reference. # User reference.
141 "kind": "analytics#userRef",
John Asmuth614db982014-04-24 15:46:26 -0400142 "id": "A String", # User ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 "email": "A String", # Email ID of this user.
John Asmuth614db982014-04-24 15:46:26 -0400144 },
145 "id": "A String", # Entity user link ID
146 "selfLink": "A String", # Self link for this resource.
147 "permissions": { # Permissions the user has for this entity.
148 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable.
149 "A String",
150 ],
151 "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.
152 "A String",
153 ],
154 },
155 }
156
157
158Returns:
159 An object of the form:
160
161 { # JSON template for an Analytics Entity-User Link. Returns permissions that a user has for an entity.
162 "kind": "analytics#entityUserLink", # Resource type for entity user link.
163 "entity": { # Entity for this link. It can be an account, a web property, or a view (profile).
164 "accountRef": { # JSON template for a linked account. # Account for this link.
165 "kind": "analytics#accountRef", # Analytics account reference.
166 "href": "A String", # Link for this account.
John Asmuth614db982014-04-24 15:46:26 -0400167 "name": "A String", # Account name.
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 "id": "A String", # Account ID.
John Asmuth614db982014-04-24 15:46:26 -0400169 },
170 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link.
171 "kind": "analytics#profileRef", # Analytics view (profile) reference.
172 "name": "A String", # Name of this view (profile).
173 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs.
174 "href": "A String", # Link for this view (profile).
175 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs.
176 "id": "A String", # View (Profile) ID.
177 "accountId": "A String", # Account ID to which this view (profile) belongs.
178 },
179 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link.
180 "kind": "analytics#webPropertyRef", # Analytics web property reference.
181 "name": "A String", # Name of this web property.
182 "internalWebPropertyId": "A String", # Internal ID for this web property.
183 "href": "A String", # Link for this web property.
184 "id": "A String", # Web property ID of the form UA-XXXXX-YY.
185 "accountId": "A String", # Account ID to which this web property belongs.
186 },
187 },
188 "userRef": { # JSON template for a user reference. # User reference.
189 "kind": "analytics#userRef",
John Asmuth614db982014-04-24 15:46:26 -0400190 "id": "A String", # User ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 "email": "A String", # Email ID of this user.
John Asmuth614db982014-04-24 15:46:26 -0400192 },
193 "id": "A String", # Entity user link ID
194 "selfLink": "A String", # Self link for this resource.
195 "permissions": { # Permissions the user has for this entity.
196 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable.
197 "A String",
198 ],
199 "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.
200 "A String",
201 ],
202 },
203 }</pre>
204</div>
205
206<div class="method">
207 <code class="details" id="list">list(accountId, webPropertyId, profileId, max_results=None, start_index=None)</code>
208 <pre>Lists profile-user links for a given view (profile).
209
210Args:
211 accountId: string, Account ID which the given view (profile) belongs to. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700212 webPropertyId: string, Web Property ID which the given view (profile) belongs to. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. (required)
213 profileId: string, View (Profile) ID to retrieve the profile-user links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. (required)
John Asmuth614db982014-04-24 15:46:26 -0400214 max_results: integer, The maximum number of profile-user links to include in this response.
215 start_index: integer, An index of the first profile-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
216
217Returns:
218 An object of the form:
219
220 { # An entity user link collection provides a list of Analytics ACL links Each resource in this collection corresponds to a single link.
221 "kind": "analytics#entityUserLinks", # Collection type.
222 "items": [ # A list of entity user links.
223 { # JSON template for an Analytics Entity-User Link. Returns permissions that a user has for an entity.
224 "kind": "analytics#entityUserLink", # Resource type for entity user link.
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 "kind": "analytics#accountRef", # Analytics account reference.
228 "href": "A String", # Link for this account.
John Asmuth614db982014-04-24 15:46:26 -0400229 "name": "A String", # Account name.
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 "id": "A String", # Account ID.
John Asmuth614db982014-04-24 15:46:26 -0400231 },
232 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link.
233 "kind": "analytics#profileRef", # Analytics view (profile) reference.
234 "name": "A String", # Name of this view (profile).
235 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs.
236 "href": "A String", # Link for this view (profile).
237 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs.
238 "id": "A String", # View (Profile) ID.
239 "accountId": "A String", # Account ID to which this view (profile) belongs.
240 },
241 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link.
242 "kind": "analytics#webPropertyRef", # Analytics web property reference.
243 "name": "A String", # Name of this web property.
244 "internalWebPropertyId": "A String", # Internal ID for this web property.
245 "href": "A String", # Link for this web property.
246 "id": "A String", # Web property ID of the form UA-XXXXX-YY.
247 "accountId": "A String", # Account ID to which this web property belongs.
248 },
249 },
250 "userRef": { # JSON template for a user reference. # User reference.
251 "kind": "analytics#userRef",
John Asmuth614db982014-04-24 15:46:26 -0400252 "id": "A String", # User ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 "email": "A String", # Email ID of this user.
John Asmuth614db982014-04-24 15:46:26 -0400254 },
255 "id": "A String", # Entity user link ID
256 "selfLink": "A String", # Self link for this resource.
257 "permissions": { # Permissions the user has for this entity.
258 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable.
259 "A String",
260 ],
261 "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.
262 "A String",
263 ],
264 },
265 },
266 ],
267 "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.
268 "previousLink": "A String", # Previous link for this account collection.
269 "startIndex": 42, # The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter.
270 "nextLink": "A String", # Next link for this account collection.
271 "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response.
272 }</pre>
273</div>
274
275<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700276 <code class="details" id="update">update(accountId, webPropertyId, profileId, linkId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400277 <pre>Updates permissions for an existing user on the given view (profile).
278
279Args:
280 accountId: string, Account ID to update the user link for. (required)
281 webPropertyId: string, Web Property ID to update the user link for. (required)
282 profileId: string, View (Profile ID) to update the user link for. (required)
283 linkId: string, Link ID to update the user link for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700284 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400285 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 "kind": "analytics#entityUserLink", # Resource type for entity user link.
289 "entity": { # Entity for this link. It can be an account, a web property, or a view (profile).
290 "accountRef": { # JSON template for a linked account. # Account for this link.
291 "kind": "analytics#accountRef", # Analytics account reference.
292 "href": "A String", # Link for this account.
John Asmuth614db982014-04-24 15:46:26 -0400293 "name": "A String", # Account name.
Dan O'Mearadd494642020-05-01 07:42:23 -0700294 "id": "A String", # Account ID.
John Asmuth614db982014-04-24 15:46:26 -0400295 },
296 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link.
297 "kind": "analytics#profileRef", # Analytics view (profile) reference.
298 "name": "A String", # Name of this view (profile).
299 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs.
300 "href": "A String", # Link for this view (profile).
301 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs.
302 "id": "A String", # View (Profile) ID.
303 "accountId": "A String", # Account ID to which this view (profile) belongs.
304 },
305 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link.
306 "kind": "analytics#webPropertyRef", # Analytics web property reference.
307 "name": "A String", # Name of this web property.
308 "internalWebPropertyId": "A String", # Internal ID for this web property.
309 "href": "A String", # Link for this web property.
310 "id": "A String", # Web property ID of the form UA-XXXXX-YY.
311 "accountId": "A String", # Account ID to which this web property belongs.
312 },
313 },
314 "userRef": { # JSON template for a user reference. # User reference.
315 "kind": "analytics#userRef",
John Asmuth614db982014-04-24 15:46:26 -0400316 "id": "A String", # User ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700317 "email": "A String", # Email ID of this user.
John Asmuth614db982014-04-24 15:46:26 -0400318 },
319 "id": "A String", # Entity user link ID
320 "selfLink": "A String", # Self link for this resource.
321 "permissions": { # Permissions the user has for this entity.
322 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable.
323 "A String",
324 ],
325 "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.
326 "A String",
327 ],
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 "kind": "analytics#entityUserLink", # Resource type for entity user link.
337 "entity": { # Entity for this link. It can be an account, a web property, or a view (profile).
338 "accountRef": { # JSON template for a linked account. # Account for this link.
339 "kind": "analytics#accountRef", # Analytics account reference.
340 "href": "A String", # Link for this account.
John Asmuth614db982014-04-24 15:46:26 -0400341 "name": "A String", # Account name.
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 "id": "A String", # Account ID.
John Asmuth614db982014-04-24 15:46:26 -0400343 },
344 "profileRef": { # JSON template for a linked view (profile). # View (Profile) for this link.
345 "kind": "analytics#profileRef", # Analytics view (profile) reference.
346 "name": "A String", # Name of this view (profile).
347 "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs.
348 "href": "A String", # Link for this view (profile).
349 "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs.
350 "id": "A String", # View (Profile) ID.
351 "accountId": "A String", # Account ID to which this view (profile) belongs.
352 },
353 "webPropertyRef": { # JSON template for a web property reference. # Web property for this link.
354 "kind": "analytics#webPropertyRef", # Analytics web property reference.
355 "name": "A String", # Name of this web property.
356 "internalWebPropertyId": "A String", # Internal ID for this web property.
357 "href": "A String", # Link for this web property.
358 "id": "A String", # Web property ID of the form UA-XXXXX-YY.
359 "accountId": "A String", # Account ID to which this web property belongs.
360 },
361 },
362 "userRef": { # JSON template for a user reference. # User reference.
363 "kind": "analytics#userRef",
John Asmuth614db982014-04-24 15:46:26 -0400364 "id": "A String", # User ID.
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 "email": "A String", # Email ID of this user.
John Asmuth614db982014-04-24 15:46:26 -0400366 },
367 "id": "A String", # Entity user link ID
368 "selfLink": "A String", # Self link for this resource.
369 "permissions": { # Permissions the user has for this entity.
370 "local": [ # Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable.
371 "A String",
372 ],
373 "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.
374 "A String",
375 ],
376 },
377 }</pre>
378</div>
379
380</body></html>