Method: users.watch
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מעקב אחרי שינויים ברשימת המשתמשים.
בקשת HTTP
POST https://admin.googleapis.com/admin/directory/v1/users/watch
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של שאילתה
פרמטרים |
domain |
string
שם הדומיין. ממלאים את השדה הזה כדי לקבל משתמשים מהדומיין הזה בלבד. כדי להציג את כל המשתמשים בכמה דומיינים, צריך למלא את שדה הלקוח במקום זאת".
|
customer |
string
מזהה קבוע של חשבון Google Workspace. במקרה של כמה דומיינים, כדי לאחזר את כל המשתמשים של לקוח, ממלאים את השדה הזה במקום את הדומיין.
|
event |
enum (EventType )
אירועים שכדאי לעקוב אחריהם.
|
customFieldMask |
string
רשימה של שמות סכמות מופרדים בפסיקים. כל השדות מהסכמות האלה מאוחזרים. צריך להגדיר את השדה הזה רק כאשר projection=custom.
|
maxResults |
integer
המספר המקסימלי של תוצאות להחזרה.
|
orderBy |
enum (OrderBy )
העמודה שבה נעשה שימוש למיון התוצאות
|
pageToken |
string
אסימון לציון הדף הבא ברשימה
|
projection |
enum (Projection )
קבוצת המשנה של השדות שרוצים לאחזר עבור המשתמש הזה.
|
query |
string
חיפוש לפי מחרוזת שאילתה. צריך להיות בפורמט ''. התיעוד המלא זמין בכתובת https: //developers.google.com/workspace/admin/directory/v1/guides/search-users
|
showDeleted |
string
אם הערך מוגדר כ-True, המערכת מאחזרת את רשימת המשתמשים שנמחקו. (ברירת המחדל: false)
|
sortOrder |
enum (SortOrder )
האם להציג את התוצאות בסדר עולה או יורד.
|
viewType |
enum (ViewType )
האם לאחזר את התצוגה הציבורית של המשתמש שזמינה רק לאדמינים או את התצוגה הציבורית ברמת הדומיין. מידע נוסף זמין במאמר אחזור משתמש כמשתמש שאינו אדמין.
|
גוף הבקשה
גוף הבקשה מכיל מופע של SubscriptionChannel
.
גוף התשובה
אם הפעולה מצליחה, גוף התגובה מכיל מופע של SubscriptionChannel
.
היקפי הרשאה
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/admin.directory.user
https://www.googleapis.com/auth/admin.directory.user.readonly
https://www.googleapis.com/auth/cloud-platform
מידע נוסף זמין במדריך ההרשאות.
EventType
טיפוסים בני מנייה (enum) |
ADD |
אירוע שנוצר על ידי משתמש |
DELETE |
אירוע 'המשתמש נמחק' |
MAKE_ADMIN |
אירוע שינוי סטטוס האדמין של משתמש |
UNDELETE |
אירוע ביטול מחיקה של משתמש |
UPDATE |
אירוע 'המשתמש עודכן' |
OrderBy
טיפוסים בני מנייה (enum) |
EMAIL |
כתובת האימייל הראשית של המשתמש. |
FAMILY_NAME |
שם המשפחה של המשתמש. |
GIVEN_NAME |
השם הפרטי של המשתמש. |
היטל
טיפוסים בני מנייה (enum) |
BASIC |
אין לכלול שדות מותאמים אישית של המשתמש. |
CUSTOM |
הכללת שדות מותאמים אישית מסכימות שצוינו ב-customFieldMask. |
FULL |
צריך לכלול את כל השדות שמשויכים למשתמש הזה. |
SortOrder
טיפוסים בני מנייה (enum) |
ASCENDING |
סדר עולה. |
DESCENDING |
בסדר יורד. |
ViewType
טיפוסים בני מנייה (enum) |
admin_view |
התוצאות כוללות שדות שגלויים רק לאדמינים וגם שדות שגלויים לכולם בדומיין. |
domain_public |
התוצאות כוללות רק שדות של המשתמש שגלויים לכולם למשתמשים אחרים בדומיין. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# Method: users.watch\n\nWatches for changes in users list.\n\n### HTTP request\n\n`POST https://admin.googleapis.com/admin/directory/v1/users/watch`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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.\" |\n| `customer` | `string` Immutable ID of the Google Workspace account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. |\n| `event` | `enum (`[EventType](/workspace/admin/directory/reference/rest/v1/users/watch#EventType)`)` Events to watch for. |\n| `customFieldMask` | `string` Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. |\n| `maxResults` | `integer` Maximum number of results to return. |\n| `orderBy` | `enum (`[OrderBy](/workspace/admin/directory/reference/rest/v1/users/watch#OrderBy)`)` Column to use for sorting results |\n| `pageToken` | `string` Token to specify next page in the list |\n| `projection` | `enum (`[Projection](/workspace/admin/directory/reference/rest/v1/users/watch#Projection)`)` What subset of fields to fetch for this user. |\n| `query` | `string` Query string search. Should be of the form \"\". Complete documentation is at https: //developers.google.com/workspace/admin/directory/v1/guides/search-users |\n| `showDeleted` | `string` If set to true, retrieves the list of deleted users. (Default: false) |\n| `sortOrder` | `enum (`[SortOrder](/workspace/admin/directory/reference/rest/v1/users/watch#SortOrder)`)` Whether to return results in ascending or descending order. |\n| `viewType` | `enum (`[ViewType](/workspace/admin/directory/reference/rest/v1/users/watch#ViewType)`)` Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users#retrieve_users_non_admin). |\n\n### Request body\n\nThe request body contains an instance of [SubscriptionChannel](/workspace/admin/directory/reference/rest/v1/SubscriptionChannel).\n\n### Response body\n\nIf successful, the response body contains an instance of [SubscriptionChannel](/workspace/admin/directory/reference/rest/v1/SubscriptionChannel).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/admin.directory.user`\n- `\n https://www.googleapis.com/auth/admin.directory.user.readonly`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nEventType\n---------\n\nType of the Subscription event\n\n| Enums ||\n|--------------|--------------------------------|\n| `ADD` | User Created Event |\n| `DELETE` | User Deleted Event |\n| `MAKE_ADMIN` | User Admin Status Change Event |\n| `UNDELETE` | User Undeleted Event |\n| `UPDATE` | User Updated Event |\n\nOrderBy\n-------\n\n| Enums ||\n|---------------|----------------------------|\n| `EMAIL` | Primary email of the user. |\n| `FAMILY_NAME` | User's family name. |\n| `GIVEN_NAME` | User's given name. |\n\nProjection\n----------\n\n| Enums ||\n|----------|------------------------------------------------------------------|\n| `BASIC` | Do not include any custom fields for the user. |\n| `CUSTOM` | Include custom fields from schemas mentioned in customFieldMask. |\n| `FULL` | Include all fields associated with this user. |\n\nSortOrder\n---------\n\n| Enums ||\n|--------------|-------------------|\n| `ASCENDING` | Ascending order. |\n| `DESCENDING` | Descending order. |\n\nViewType\n--------\n\n| Enums ||\n|-----------------|--------------------------------------------------------------------------------------------------|\n| `admin_view` | Results include both administrator-only and domain-public fields. |\n| `domain_public` | Results only include fields for the user that are publicly visible to other users in the domain. |"]]