Method: users.watch
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
HTTP 요청
POST https://admin.googleapis.com/admin/directory/v1/users/watch
URL은 gRPC 트랜스코딩 구문을 사용합니다.
쿼리 매개변수
매개변수 |
domain |
string
도메인 이름입니다. 이 필드를 채우면 이 도메인의 사용자만 가져올 수 있습니다. 대신 다중 도메인에서 모든 사용자를 반환하여 고객 입력란을 채웁니다."
|
customer |
string
Google Workspace 계정의 변경할 수 없는 ID입니다. 다중 도메인인 경우 고객의 모든 사용자를 가져오려면 도메인 대신 이 필드를 채웁니다.
|
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
열거형 |
ADD |
사용자 생성 이벤트 |
DELETE |
사용자가 삭제한 이벤트 |
MAKE_ADMIN |
사용자 관리자 상태 변경 이벤트 |
UNDELETE |
사용자 삭제 취소 이벤트 |
UPDATE |
사용자 업데이트 이벤트 |
OrderBy
열거형 |
EMAIL |
사용자의 기본 이메일입니다. |
FAMILY_NAME |
사용자의 성입니다. |
GIVEN_NAME |
사용자의 이름입니다. |
투영
열거형 |
BASIC |
사용자의 맞춤 입력란은 포함하지 마세요. |
CUSTOM |
customFieldMask에 언급된 스키마의 맞춤 필드를 포함합니다. |
FULL |
이 사용자와 연결된 모든 필드를 포함합니다. |
SortOrder
열거형 |
ASCENDING |
오름차순. |
DESCENDING |
내림차순 |
ViewType
열거형 |
admin_view |
결과에는 관리자 전용 필드와 도메인 공개 필드가 모두 포함됩니다. |
domain_public |
결과에는 도메인의 다른 사용자에게 공개적으로 표시되는 사용자의 필드만 포함됩니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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. |"]]