• 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="admin_directory_v1.html">Admin Directory API</a> . <a href="admin_directory_v1.users.html">users</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="admin_directory_v1.users.aliases.html">aliases()</a></code>
79</p>
80<p class="firstline">Returns the aliases Resource.</p>
81
82<p class="toc_element">
83  <code><a href="admin_directory_v1.users.photos.html">photos()</a></code>
84</p>
85<p class="firstline">Returns the photos Resource.</p>
86
87<p class="toc_element">
88  <code><a href="#delete">delete(userKey)</a></code></p>
89<p class="firstline">Delete user</p>
90<p class="toc_element">
91  <code><a href="#get">get(userKey, projection=None, customFieldMask=None, viewType=None)</a></code></p>
92<p class="firstline">retrieve user</p>
93<p class="toc_element">
94  <code><a href="#insert">insert(body)</a></code></p>
95<p class="firstline">create user.</p>
96<p class="toc_element">
97  <code><a href="#list">list(orderBy=None, domain=None, projection=None, query=None, event=None, showDeleted=None, pageToken=None, sortOrder=None, maxResults=None, customer=None, customFieldMask=None, viewType=None)</a></code></p>
98<p class="firstline">Retrieve either deleted users or all users in a domain (paginated)</p>
99<p class="toc_element">
100  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
101<p class="firstline">Retrieves the next page of results.</p>
102<p class="toc_element">
103  <code><a href="#makeAdmin">makeAdmin(userKey, body)</a></code></p>
104<p class="firstline">change admin status of a user</p>
105<p class="toc_element">
106  <code><a href="#patch">patch(userKey, body)</a></code></p>
107<p class="firstline">update user. This method supports patch semantics.</p>
108<p class="toc_element">
109  <code><a href="#undelete">undelete(userKey, body)</a></code></p>
110<p class="firstline">Undelete a deleted user</p>
111<p class="toc_element">
112  <code><a href="#update">update(userKey, body)</a></code></p>
113<p class="firstline">update user</p>
114<p class="toc_element">
115  <code><a href="#watch">watch(body, orderBy=None, domain=None, projection=None, query=None, event=None, showDeleted=None, pageToken=None, sortOrder=None, maxResults=None, customer=None, customFieldMask=None, viewType=None)</a></code></p>
116<p class="firstline">Watch for changes in users list</p>
117<h3>Method Details</h3>
118<div class="method">
119    <code class="details" id="delete">delete(userKey)</code>
120  <pre>Delete user
121
122Args:
123  userKey: string, Email or immutable ID of the user (required)
124</pre>
125</div>
126
127<div class="method">
128    <code class="details" id="get">get(userKey, projection=None, customFieldMask=None, viewType=None)</code>
129  <pre>retrieve user
130
131Args:
132  userKey: string, Email or immutable ID of the user (required)
133  projection: string, What subset of fields to fetch for this user.
134    Allowed values
135      basic - Do not include any custom fields for the user.
136      custom - Include custom fields from schemas mentioned in customFieldMask.
137      full - Include all fields associated with this user.
138  customFieldMask: string, Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
139  viewType: string, Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
140    Allowed values
141      admin_view - Fetches the ADMIN_VIEW of the user.
142      domain_public - Fetches the DOMAIN_PUBLIC view of the user.
143
144Returns:
145  An object of the form:
146
147    { # JSON template for User object in Directory API.
148      "addresses": "",
149      "posixAccounts": "",
150      "phones": "",
151      "locations": "",
152      "isDelegatedAdmin": True or False, # Boolean indicating if the user is delegated admin (Read-only)
153      "thumbnailPhotoEtag": "A String", # ETag of the user's photo (Read-only)
154      "suspended": True or False, # Indicates if user is suspended.
155      "keywords": "",
156      "id": "A String", # Unique identifier of User (Read-only)
157      "aliases": [ # List of aliases (Read-only)
158        "A String",
159      ],
160      "nonEditableAliases": [ # List of non editable aliases (Read-only)
161        "A String",
162      ],
163      "archived": True or False, # Indicates if user is archived.
164      "deletionTime": "A String",
165      "suspensionReason": "A String", # Suspension reason if user is suspended (Read-only)
166      "thumbnailPhotoUrl": "A String", # Photo Url of the user (Read-only)
167      "isEnrolledIn2Sv": True or False, # Is enrolled in 2-step verification (Read-only)
168      "isAdmin": True or False, # Boolean indicating if the user is admin (Read-only)
169      "relations": "",
170      "includeInGlobalAddressList": True or False, # Boolean indicating if user is included in Global Address List
171      "languages": "",
172      "ims": "",
173      "etag": "A String", # ETag of the resource.
174      "lastLoginTime": "A String", # User's last login time. (Read-only)
175      "orgUnitPath": "A String", # OrgUnit of User
176      "agreedToTerms": True or False, # Indicates if user has agreed to terms (Read-only)
177      "externalIds": "",
178      "ipWhitelisted": True or False, # Boolean indicating if ip is whitelisted
179      "sshPublicKeys": "",
180      "customSchemas": { # Custom fields of the user.
181        "a_key": { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
182          "a_key": "",
183        },
184      },
185      "isEnforcedIn2Sv": True or False, # Is 2-step verification enforced (Read-only)
186      "isMailboxSetup": True or False, # Is mailbox setup (Read-only)
187      "primaryEmail": "A String", # username of User
188      "password": "A String", # User's password
189      "emails": "",
190      "organizations": "",
191      "kind": "admin#directory#user", # Kind of resource this is.
192      "hashFunction": "A String", # Hash function name for password. Supported are MD5, SHA-1 and crypt
193      "name": { # JSON template for name of a user in Directory API. # User's name
194        "givenName": "A String", # First Name
195        "fullName": "A String", # Full Name
196        "familyName": "A String", # Last Name
197      },
198      "gender": "",
199      "notes": "",
200      "creationTime": "A String", # User's G Suite account creation time. (Read-only)
201      "websites": "",
202      "changePasswordAtNextLogin": True or False, # Boolean indicating if the user should change password in next login
203      "customerId": "A String", # CustomerId of User (Read-only)
204    }</pre>
205</div>
206
207<div class="method">
208    <code class="details" id="insert">insert(body)</code>
209  <pre>create user.
210
211Args:
212  body: object, The request body. (required)
213    The object takes the form of:
214
215{ # JSON template for User object in Directory API.
216    "addresses": "",
217    "posixAccounts": "",
218    "phones": "",
219    "locations": "",
220    "isDelegatedAdmin": True or False, # Boolean indicating if the user is delegated admin (Read-only)
221    "thumbnailPhotoEtag": "A String", # ETag of the user's photo (Read-only)
222    "suspended": True or False, # Indicates if user is suspended.
223    "keywords": "",
224    "id": "A String", # Unique identifier of User (Read-only)
225    "aliases": [ # List of aliases (Read-only)
226      "A String",
227    ],
228    "nonEditableAliases": [ # List of non editable aliases (Read-only)
229      "A String",
230    ],
231    "archived": True or False, # Indicates if user is archived.
232    "deletionTime": "A String",
233    "suspensionReason": "A String", # Suspension reason if user is suspended (Read-only)
234    "thumbnailPhotoUrl": "A String", # Photo Url of the user (Read-only)
235    "isEnrolledIn2Sv": True or False, # Is enrolled in 2-step verification (Read-only)
236    "isAdmin": True or False, # Boolean indicating if the user is admin (Read-only)
237    "relations": "",
238    "includeInGlobalAddressList": True or False, # Boolean indicating if user is included in Global Address List
239    "languages": "",
240    "ims": "",
241    "etag": "A String", # ETag of the resource.
242    "lastLoginTime": "A String", # User's last login time. (Read-only)
243    "orgUnitPath": "A String", # OrgUnit of User
244    "agreedToTerms": True or False, # Indicates if user has agreed to terms (Read-only)
245    "externalIds": "",
246    "ipWhitelisted": True or False, # Boolean indicating if ip is whitelisted
247    "sshPublicKeys": "",
248    "customSchemas": { # Custom fields of the user.
249      "a_key": { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
250        "a_key": "",
251      },
252    },
253    "isEnforcedIn2Sv": True or False, # Is 2-step verification enforced (Read-only)
254    "isMailboxSetup": True or False, # Is mailbox setup (Read-only)
255    "primaryEmail": "A String", # username of User
256    "password": "A String", # User's password
257    "emails": "",
258    "organizations": "",
259    "kind": "admin#directory#user", # Kind of resource this is.
260    "hashFunction": "A String", # Hash function name for password. Supported are MD5, SHA-1 and crypt
261    "name": { # JSON template for name of a user in Directory API. # User's name
262      "givenName": "A String", # First Name
263      "fullName": "A String", # Full Name
264      "familyName": "A String", # Last Name
265    },
266    "gender": "",
267    "notes": "",
268    "creationTime": "A String", # User's G Suite account creation time. (Read-only)
269    "websites": "",
270    "changePasswordAtNextLogin": True or False, # Boolean indicating if the user should change password in next login
271    "customerId": "A String", # CustomerId of User (Read-only)
272  }
273
274
275Returns:
276  An object of the form:
277
278    { # JSON template for User object in Directory API.
279      "addresses": "",
280      "posixAccounts": "",
281      "phones": "",
282      "locations": "",
283      "isDelegatedAdmin": True or False, # Boolean indicating if the user is delegated admin (Read-only)
284      "thumbnailPhotoEtag": "A String", # ETag of the user's photo (Read-only)
285      "suspended": True or False, # Indicates if user is suspended.
286      "keywords": "",
287      "id": "A String", # Unique identifier of User (Read-only)
288      "aliases": [ # List of aliases (Read-only)
289        "A String",
290      ],
291      "nonEditableAliases": [ # List of non editable aliases (Read-only)
292        "A String",
293      ],
294      "archived": True or False, # Indicates if user is archived.
295      "deletionTime": "A String",
296      "suspensionReason": "A String", # Suspension reason if user is suspended (Read-only)
297      "thumbnailPhotoUrl": "A String", # Photo Url of the user (Read-only)
298      "isEnrolledIn2Sv": True or False, # Is enrolled in 2-step verification (Read-only)
299      "isAdmin": True or False, # Boolean indicating if the user is admin (Read-only)
300      "relations": "",
301      "includeInGlobalAddressList": True or False, # Boolean indicating if user is included in Global Address List
302      "languages": "",
303      "ims": "",
304      "etag": "A String", # ETag of the resource.
305      "lastLoginTime": "A String", # User's last login time. (Read-only)
306      "orgUnitPath": "A String", # OrgUnit of User
307      "agreedToTerms": True or False, # Indicates if user has agreed to terms (Read-only)
308      "externalIds": "",
309      "ipWhitelisted": True or False, # Boolean indicating if ip is whitelisted
310      "sshPublicKeys": "",
311      "customSchemas": { # Custom fields of the user.
312        "a_key": { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
313          "a_key": "",
314        },
315      },
316      "isEnforcedIn2Sv": True or False, # Is 2-step verification enforced (Read-only)
317      "isMailboxSetup": True or False, # Is mailbox setup (Read-only)
318      "primaryEmail": "A String", # username of User
319      "password": "A String", # User's password
320      "emails": "",
321      "organizations": "",
322      "kind": "admin#directory#user", # Kind of resource this is.
323      "hashFunction": "A String", # Hash function name for password. Supported are MD5, SHA-1 and crypt
324      "name": { # JSON template for name of a user in Directory API. # User's name
325        "givenName": "A String", # First Name
326        "fullName": "A String", # Full Name
327        "familyName": "A String", # Last Name
328      },
329      "gender": "",
330      "notes": "",
331      "creationTime": "A String", # User's G Suite account creation time. (Read-only)
332      "websites": "",
333      "changePasswordAtNextLogin": True or False, # Boolean indicating if the user should change password in next login
334      "customerId": "A String", # CustomerId of User (Read-only)
335    }</pre>
336</div>
337
338<div class="method">
339    <code class="details" id="list">list(orderBy=None, domain=None, projection=None, query=None, event=None, showDeleted=None, pageToken=None, sortOrder=None, maxResults=None, customer=None, customFieldMask=None, viewType=None)</code>
340  <pre>Retrieve either deleted users or all users in a domain (paginated)
341
342Args:
343  orderBy: string, Column to use for sorting results
344    Allowed values
345      email - Primary email of the user.
346      familyName - User's family name.
347      givenName - User's given name.
348  domain: string, Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.
349  projection: string, What subset of fields to fetch for this user.
350    Allowed values
351      basic - Do not include any custom fields for the user.
352      custom - Include custom fields from schemas mentioned in customFieldMask.
353      full - Include all fields associated with this user.
354  query: string, Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users
355  event: string, Event on which subscription is intended (if subscribing)
356    Allowed values
357      add - User Created Event
358      delete - User Deleted Event
359      makeAdmin - User Admin Status Change Event
360      undelete - User Undeleted Event
361      update - User Updated Event
362  showDeleted: string, If set to true retrieves the list of deleted users. Default is false
363  pageToken: string, Token to specify next page in the list
364  sortOrder: string, Whether to return results in ascending or descending order.
365    Allowed values
366      ASCENDING - Ascending order.
367      DESCENDING - Descending order.
368  maxResults: integer, Maximum number of results to return. Default is 100. Max allowed is 500
369  customer: string, Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.
370  customFieldMask: string, Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
371  viewType: string, Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
372    Allowed values
373      admin_view - Fetches the ADMIN_VIEW of the user.
374      domain_public - Fetches the DOMAIN_PUBLIC view of the user.
375
376Returns:
377  An object of the form:
378
379    { # JSON response template for List Users operation in Apps Directory API.
380    "nextPageToken": "A String", # Token used to access next page of this result.
381    "kind": "admin#directory#users", # Kind of resource this is.
382    "etag": "A String", # ETag of the resource.
383    "trigger_event": "A String", # Event that triggered this response (only used in case of Push Response)
384    "users": [ # List of user objects.
385      { # JSON template for User object in Directory API.
386          "addresses": "",
387          "posixAccounts": "",
388          "phones": "",
389          "locations": "",
390          "isDelegatedAdmin": True or False, # Boolean indicating if the user is delegated admin (Read-only)
391          "thumbnailPhotoEtag": "A String", # ETag of the user's photo (Read-only)
392          "suspended": True or False, # Indicates if user is suspended.
393          "keywords": "",
394          "id": "A String", # Unique identifier of User (Read-only)
395          "aliases": [ # List of aliases (Read-only)
396            "A String",
397          ],
398          "nonEditableAliases": [ # List of non editable aliases (Read-only)
399            "A String",
400          ],
401          "archived": True or False, # Indicates if user is archived.
402          "deletionTime": "A String",
403          "suspensionReason": "A String", # Suspension reason if user is suspended (Read-only)
404          "thumbnailPhotoUrl": "A String", # Photo Url of the user (Read-only)
405          "isEnrolledIn2Sv": True or False, # Is enrolled in 2-step verification (Read-only)
406          "isAdmin": True or False, # Boolean indicating if the user is admin (Read-only)
407          "relations": "",
408          "includeInGlobalAddressList": True or False, # Boolean indicating if user is included in Global Address List
409          "languages": "",
410          "ims": "",
411          "etag": "A String", # ETag of the resource.
412          "lastLoginTime": "A String", # User's last login time. (Read-only)
413          "orgUnitPath": "A String", # OrgUnit of User
414          "agreedToTerms": True or False, # Indicates if user has agreed to terms (Read-only)
415          "externalIds": "",
416          "ipWhitelisted": True or False, # Boolean indicating if ip is whitelisted
417          "sshPublicKeys": "",
418          "customSchemas": { # Custom fields of the user.
419            "a_key": { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
420              "a_key": "",
421            },
422          },
423          "isEnforcedIn2Sv": True or False, # Is 2-step verification enforced (Read-only)
424          "isMailboxSetup": True or False, # Is mailbox setup (Read-only)
425          "primaryEmail": "A String", # username of User
426          "password": "A String", # User's password
427          "emails": "",
428          "organizations": "",
429          "kind": "admin#directory#user", # Kind of resource this is.
430          "hashFunction": "A String", # Hash function name for password. Supported are MD5, SHA-1 and crypt
431          "name": { # JSON template for name of a user in Directory API. # User's name
432            "givenName": "A String", # First Name
433            "fullName": "A String", # Full Name
434            "familyName": "A String", # Last Name
435          },
436          "gender": "",
437          "notes": "",
438          "creationTime": "A String", # User's G Suite account creation time. (Read-only)
439          "websites": "",
440          "changePasswordAtNextLogin": True or False, # Boolean indicating if the user should change password in next login
441          "customerId": "A String", # CustomerId of User (Read-only)
442        },
443    ],
444  }</pre>
445</div>
446
447<div class="method">
448    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
449  <pre>Retrieves the next page of results.
450
451Args:
452  previous_request: The request for the previous page. (required)
453  previous_response: The response from the request for the previous page. (required)
454
455Returns:
456  A request object that you can call 'execute()' on to request the next
457  page. Returns None if there are no more items in the collection.
458    </pre>
459</div>
460
461<div class="method">
462    <code class="details" id="makeAdmin">makeAdmin(userKey, body)</code>
463  <pre>change admin status of a user
464
465Args:
466  userKey: string, Email or immutable ID of the user as admin (required)
467  body: object, The request body. (required)
468    The object takes the form of:
469
470{ # JSON request template for setting/revoking admin status of a user in Directory API.
471    "status": True or False, # Boolean indicating new admin status of the user
472  }
473
474</pre>
475</div>
476
477<div class="method">
478    <code class="details" id="patch">patch(userKey, body)</code>
479  <pre>update user. This method supports patch semantics.
480
481Args:
482  userKey: string, Email or immutable ID of the user. If ID, it should match with id of user object (required)
483  body: object, The request body. (required)
484    The object takes the form of:
485
486{ # JSON template for User object in Directory API.
487    "addresses": "",
488    "posixAccounts": "",
489    "phones": "",
490    "locations": "",
491    "isDelegatedAdmin": True or False, # Boolean indicating if the user is delegated admin (Read-only)
492    "thumbnailPhotoEtag": "A String", # ETag of the user's photo (Read-only)
493    "suspended": True or False, # Indicates if user is suspended.
494    "keywords": "",
495    "id": "A String", # Unique identifier of User (Read-only)
496    "aliases": [ # List of aliases (Read-only)
497      "A String",
498    ],
499    "nonEditableAliases": [ # List of non editable aliases (Read-only)
500      "A String",
501    ],
502    "archived": True or False, # Indicates if user is archived.
503    "deletionTime": "A String",
504    "suspensionReason": "A String", # Suspension reason if user is suspended (Read-only)
505    "thumbnailPhotoUrl": "A String", # Photo Url of the user (Read-only)
506    "isEnrolledIn2Sv": True or False, # Is enrolled in 2-step verification (Read-only)
507    "isAdmin": True or False, # Boolean indicating if the user is admin (Read-only)
508    "relations": "",
509    "includeInGlobalAddressList": True or False, # Boolean indicating if user is included in Global Address List
510    "languages": "",
511    "ims": "",
512    "etag": "A String", # ETag of the resource.
513    "lastLoginTime": "A String", # User's last login time. (Read-only)
514    "orgUnitPath": "A String", # OrgUnit of User
515    "agreedToTerms": True or False, # Indicates if user has agreed to terms (Read-only)
516    "externalIds": "",
517    "ipWhitelisted": True or False, # Boolean indicating if ip is whitelisted
518    "sshPublicKeys": "",
519    "customSchemas": { # Custom fields of the user.
520      "a_key": { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
521        "a_key": "",
522      },
523    },
524    "isEnforcedIn2Sv": True or False, # Is 2-step verification enforced (Read-only)
525    "isMailboxSetup": True or False, # Is mailbox setup (Read-only)
526    "primaryEmail": "A String", # username of User
527    "password": "A String", # User's password
528    "emails": "",
529    "organizations": "",
530    "kind": "admin#directory#user", # Kind of resource this is.
531    "hashFunction": "A String", # Hash function name for password. Supported are MD5, SHA-1 and crypt
532    "name": { # JSON template for name of a user in Directory API. # User's name
533      "givenName": "A String", # First Name
534      "fullName": "A String", # Full Name
535      "familyName": "A String", # Last Name
536    },
537    "gender": "",
538    "notes": "",
539    "creationTime": "A String", # User's G Suite account creation time. (Read-only)
540    "websites": "",
541    "changePasswordAtNextLogin": True or False, # Boolean indicating if the user should change password in next login
542    "customerId": "A String", # CustomerId of User (Read-only)
543  }
544
545
546Returns:
547  An object of the form:
548
549    { # JSON template for User object in Directory API.
550      "addresses": "",
551      "posixAccounts": "",
552      "phones": "",
553      "locations": "",
554      "isDelegatedAdmin": True or False, # Boolean indicating if the user is delegated admin (Read-only)
555      "thumbnailPhotoEtag": "A String", # ETag of the user's photo (Read-only)
556      "suspended": True or False, # Indicates if user is suspended.
557      "keywords": "",
558      "id": "A String", # Unique identifier of User (Read-only)
559      "aliases": [ # List of aliases (Read-only)
560        "A String",
561      ],
562      "nonEditableAliases": [ # List of non editable aliases (Read-only)
563        "A String",
564      ],
565      "archived": True or False, # Indicates if user is archived.
566      "deletionTime": "A String",
567      "suspensionReason": "A String", # Suspension reason if user is suspended (Read-only)
568      "thumbnailPhotoUrl": "A String", # Photo Url of the user (Read-only)
569      "isEnrolledIn2Sv": True or False, # Is enrolled in 2-step verification (Read-only)
570      "isAdmin": True or False, # Boolean indicating if the user is admin (Read-only)
571      "relations": "",
572      "includeInGlobalAddressList": True or False, # Boolean indicating if user is included in Global Address List
573      "languages": "",
574      "ims": "",
575      "etag": "A String", # ETag of the resource.
576      "lastLoginTime": "A String", # User's last login time. (Read-only)
577      "orgUnitPath": "A String", # OrgUnit of User
578      "agreedToTerms": True or False, # Indicates if user has agreed to terms (Read-only)
579      "externalIds": "",
580      "ipWhitelisted": True or False, # Boolean indicating if ip is whitelisted
581      "sshPublicKeys": "",
582      "customSchemas": { # Custom fields of the user.
583        "a_key": { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
584          "a_key": "",
585        },
586      },
587      "isEnforcedIn2Sv": True or False, # Is 2-step verification enforced (Read-only)
588      "isMailboxSetup": True or False, # Is mailbox setup (Read-only)
589      "primaryEmail": "A String", # username of User
590      "password": "A String", # User's password
591      "emails": "",
592      "organizations": "",
593      "kind": "admin#directory#user", # Kind of resource this is.
594      "hashFunction": "A String", # Hash function name for password. Supported are MD5, SHA-1 and crypt
595      "name": { # JSON template for name of a user in Directory API. # User's name
596        "givenName": "A String", # First Name
597        "fullName": "A String", # Full Name
598        "familyName": "A String", # Last Name
599      },
600      "gender": "",
601      "notes": "",
602      "creationTime": "A String", # User's G Suite account creation time. (Read-only)
603      "websites": "",
604      "changePasswordAtNextLogin": True or False, # Boolean indicating if the user should change password in next login
605      "customerId": "A String", # CustomerId of User (Read-only)
606    }</pre>
607</div>
608
609<div class="method">
610    <code class="details" id="undelete">undelete(userKey, body)</code>
611  <pre>Undelete a deleted user
612
613Args:
614  userKey: string, The immutable id of the user (required)
615  body: object, The request body. (required)
616    The object takes the form of:
617
618{ # JSON request template to undelete a user in Directory API.
619    "orgUnitPath": "A String", # OrgUnit of User
620  }
621
622</pre>
623</div>
624
625<div class="method">
626    <code class="details" id="update">update(userKey, body)</code>
627  <pre>update user
628
629Args:
630  userKey: string, Email or immutable ID of the user. If ID, it should match with id of user object (required)
631  body: object, The request body. (required)
632    The object takes the form of:
633
634{ # JSON template for User object in Directory API.
635    "addresses": "",
636    "posixAccounts": "",
637    "phones": "",
638    "locations": "",
639    "isDelegatedAdmin": True or False, # Boolean indicating if the user is delegated admin (Read-only)
640    "thumbnailPhotoEtag": "A String", # ETag of the user's photo (Read-only)
641    "suspended": True or False, # Indicates if user is suspended.
642    "keywords": "",
643    "id": "A String", # Unique identifier of User (Read-only)
644    "aliases": [ # List of aliases (Read-only)
645      "A String",
646    ],
647    "nonEditableAliases": [ # List of non editable aliases (Read-only)
648      "A String",
649    ],
650    "archived": True or False, # Indicates if user is archived.
651    "deletionTime": "A String",
652    "suspensionReason": "A String", # Suspension reason if user is suspended (Read-only)
653    "thumbnailPhotoUrl": "A String", # Photo Url of the user (Read-only)
654    "isEnrolledIn2Sv": True or False, # Is enrolled in 2-step verification (Read-only)
655    "isAdmin": True or False, # Boolean indicating if the user is admin (Read-only)
656    "relations": "",
657    "includeInGlobalAddressList": True or False, # Boolean indicating if user is included in Global Address List
658    "languages": "",
659    "ims": "",
660    "etag": "A String", # ETag of the resource.
661    "lastLoginTime": "A String", # User's last login time. (Read-only)
662    "orgUnitPath": "A String", # OrgUnit of User
663    "agreedToTerms": True or False, # Indicates if user has agreed to terms (Read-only)
664    "externalIds": "",
665    "ipWhitelisted": True or False, # Boolean indicating if ip is whitelisted
666    "sshPublicKeys": "",
667    "customSchemas": { # Custom fields of the user.
668      "a_key": { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
669        "a_key": "",
670      },
671    },
672    "isEnforcedIn2Sv": True or False, # Is 2-step verification enforced (Read-only)
673    "isMailboxSetup": True or False, # Is mailbox setup (Read-only)
674    "primaryEmail": "A String", # username of User
675    "password": "A String", # User's password
676    "emails": "",
677    "organizations": "",
678    "kind": "admin#directory#user", # Kind of resource this is.
679    "hashFunction": "A String", # Hash function name for password. Supported are MD5, SHA-1 and crypt
680    "name": { # JSON template for name of a user in Directory API. # User's name
681      "givenName": "A String", # First Name
682      "fullName": "A String", # Full Name
683      "familyName": "A String", # Last Name
684    },
685    "gender": "",
686    "notes": "",
687    "creationTime": "A String", # User's G Suite account creation time. (Read-only)
688    "websites": "",
689    "changePasswordAtNextLogin": True or False, # Boolean indicating if the user should change password in next login
690    "customerId": "A String", # CustomerId of User (Read-only)
691  }
692
693
694Returns:
695  An object of the form:
696
697    { # JSON template for User object in Directory API.
698      "addresses": "",
699      "posixAccounts": "",
700      "phones": "",
701      "locations": "",
702      "isDelegatedAdmin": True or False, # Boolean indicating if the user is delegated admin (Read-only)
703      "thumbnailPhotoEtag": "A String", # ETag of the user's photo (Read-only)
704      "suspended": True or False, # Indicates if user is suspended.
705      "keywords": "",
706      "id": "A String", # Unique identifier of User (Read-only)
707      "aliases": [ # List of aliases (Read-only)
708        "A String",
709      ],
710      "nonEditableAliases": [ # List of non editable aliases (Read-only)
711        "A String",
712      ],
713      "archived": True or False, # Indicates if user is archived.
714      "deletionTime": "A String",
715      "suspensionReason": "A String", # Suspension reason if user is suspended (Read-only)
716      "thumbnailPhotoUrl": "A String", # Photo Url of the user (Read-only)
717      "isEnrolledIn2Sv": True or False, # Is enrolled in 2-step verification (Read-only)
718      "isAdmin": True or False, # Boolean indicating if the user is admin (Read-only)
719      "relations": "",
720      "includeInGlobalAddressList": True or False, # Boolean indicating if user is included in Global Address List
721      "languages": "",
722      "ims": "",
723      "etag": "A String", # ETag of the resource.
724      "lastLoginTime": "A String", # User's last login time. (Read-only)
725      "orgUnitPath": "A String", # OrgUnit of User
726      "agreedToTerms": True or False, # Indicates if user has agreed to terms (Read-only)
727      "externalIds": "",
728      "ipWhitelisted": True or False, # Boolean indicating if ip is whitelisted
729      "sshPublicKeys": "",
730      "customSchemas": { # Custom fields of the user.
731        "a_key": { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
732          "a_key": "",
733        },
734      },
735      "isEnforcedIn2Sv": True or False, # Is 2-step verification enforced (Read-only)
736      "isMailboxSetup": True or False, # Is mailbox setup (Read-only)
737      "primaryEmail": "A String", # username of User
738      "password": "A String", # User's password
739      "emails": "",
740      "organizations": "",
741      "kind": "admin#directory#user", # Kind of resource this is.
742      "hashFunction": "A String", # Hash function name for password. Supported are MD5, SHA-1 and crypt
743      "name": { # JSON template for name of a user in Directory API. # User's name
744        "givenName": "A String", # First Name
745        "fullName": "A String", # Full Name
746        "familyName": "A String", # Last Name
747      },
748      "gender": "",
749      "notes": "",
750      "creationTime": "A String", # User's G Suite account creation time. (Read-only)
751      "websites": "",
752      "changePasswordAtNextLogin": True or False, # Boolean indicating if the user should change password in next login
753      "customerId": "A String", # CustomerId of User (Read-only)
754    }</pre>
755</div>
756
757<div class="method">
758    <code class="details" id="watch">watch(body, orderBy=None, domain=None, projection=None, query=None, event=None, showDeleted=None, pageToken=None, sortOrder=None, maxResults=None, customer=None, customFieldMask=None, viewType=None)</code>
759  <pre>Watch for changes in users list
760
761Args:
762  body: object, The request body. (required)
763    The object takes the form of:
764
765{ # An notification channel used to watch for resource changes.
766    "resourceUri": "A String", # A version-specific identifier for the watched resource.
767    "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
768    "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
769    "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
770    "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
771    "params": { # Additional parameters controlling delivery channel behavior. Optional.
772      "a_key": "A String", # Declares a new parameter by name.
773    },
774    "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
775    "address": "A String", # The address where notifications are delivered for this channel.
776    "type": "A String", # The type of delivery mechanism used for this channel.
777    "id": "A String", # A UUID or similar unique string that identifies this channel.
778  }
779
780  orderBy: string, Column to use for sorting results
781    Allowed values
782      email - Primary email of the user.
783      familyName - User's family name.
784      givenName - User's given name.
785  domain: string, Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.
786  projection: string, What subset of fields to fetch for this user.
787    Allowed values
788      basic - Do not include any custom fields for the user.
789      custom - Include custom fields from schemas mentioned in customFieldMask.
790      full - Include all fields associated with this user.
791  query: string, Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users
792  event: string, Event on which subscription is intended (if subscribing)
793    Allowed values
794      add - User Created Event
795      delete - User Deleted Event
796      makeAdmin - User Admin Status Change Event
797      undelete - User Undeleted Event
798      update - User Updated Event
799  showDeleted: string, If set to true retrieves the list of deleted users. Default is false
800  pageToken: string, Token to specify next page in the list
801  sortOrder: string, Whether to return results in ascending or descending order.
802    Allowed values
803      ASCENDING - Ascending order.
804      DESCENDING - Descending order.
805  maxResults: integer, Maximum number of results to return. Default is 100. Max allowed is 500
806  customer: string, Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.
807  customFieldMask: string, Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
808  viewType: string, Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
809    Allowed values
810      admin_view - Fetches the ADMIN_VIEW of the user.
811      domain_public - Fetches the DOMAIN_PUBLIC view of the user.
812
813Returns:
814  An object of the form:
815
816    { # An notification channel used to watch for resource changes.
817      "resourceUri": "A String", # A version-specific identifier for the watched resource.
818      "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
819      "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
820      "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
821      "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
822      "params": { # Additional parameters controlling delivery channel behavior. Optional.
823        "a_key": "A String", # Declares a new parameter by name.
824      },
825      "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
826      "address": "A String", # The address where notifications are delivered for this channel.
827      "type": "A String", # The type of delivery mechanism used for this channel.
828      "id": "A String", # A UUID or similar unique string that identifies this channel.
829    }</pre>
830</div>
831
832</body></html>