Method: people.searchDirectoryPeople
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
認証されたユーザーのドメイン ディレクトリ内の、検索クエリに一致するドメイン プロフィールとドメインの連絡先のリストを提供します。
HTTP リクエスト
GET https://people.googleapis.com/v1/people:searchDirectoryPeople
この URL は gRPC Transcoding 構文を使用します。
クエリ パラメータ
パラメータ |
query |
string
必須。人物のフィールドに一致する接頭辞クエリ。照合するフィールドの決定に readMask を使用しません。
|
readMask |
string (FieldMask format)
必須。各ユーザーのどのフィールドを返すかを制限するフィールド マスク。複数のフィールドを指定する場合は、カンマで区切ります。指定できる値は次のとおりです。
- addresses
- ageRanges
- 伝記
- 誕生日
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- イベント
- externalIds
- 性別
- imClients
- インタレスト
- locales
- 開催地
- メンバーシップ
- メタデータ
- miscKeywords
- 名前
- ニックネーム
- 職業
- 組織
- phoneNumbers
- 写真
- 関係
- sipAddresses
- skills
- URL
- userDefined
|
sources[] |
enum (DirectorySourceType )
必須。返されるディレクトリ ソース。
|
mergeSources[] |
enum (DirectoryMergeSourceType )
省略可。メールアドレスや電話番号などの確認済み結合キーを介して接続されている場合、ディレクトリ ソースに統合する追加データ。
|
pageSize |
integer
省略可。レスポンスに含めるユーザーの数。有効な値は 1 ~ 500 です。設定しない場合、または 0 に設定した場合のデフォルトは 100 です。
|
pageToken |
string
省略可。前のレスポンス nextPageToken から受け取ったページトークン。後続のページを取得するにはこれを指定します。 ページ分割を行う場合、[people.searchDirectoryPeople ][google.people.v1.SearchDirectoryPeople] に渡される他のすべてのパラメータは、ページトークンを提供した最初の呼び出しと一致する必要があります。
|
リクエスト本文
リクエストの本文は空にする必要があります。
レスポンスの本文
認証されたユーザーのドメイン ディレクトリ内で、指定したクエリに一致するユーザーのリクエストに対するレスポンス。
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
JSON 表現 |
{
"people": [
{
object (Person )
}
],
"nextPageToken": string,
"totalSize": integer
} |
フィールド |
people[] |
object (Person )
クエリに一致するドメイン ディレクトリ内のユーザーのリスト。
|
nextPageToken |
string
次のページを取得するために pageToken として送信できるトークン。このフィールドを省略すると、後続のページはなくなります。
|
totalSize |
integer
ページ分けされていないリスト内のアイテムの合計数。
|
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/directory.readonly
詳細については、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-08 UTC。
[null,null,["最終更新日 2024-11-08 UTC。"],[[["\u003cp\u003eSearch for people in your domain directory using a prefix query that matches various person fields.\u003c/p\u003e\n"],["\u003cp\u003eCustomize the search by specifying fields to return, directory sources, and optional data merging.\u003c/p\u003e\n"],["\u003cp\u003eResults are paginated with controls for page size and retrieval of subsequent pages.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/directory.readonly\u003c/code\u003e scope for read access to the directory.\u003c/p\u003e\n"]]],["This describes how to search for people in a domain directory. Use a `GET` request to `https://people.googleapis.com/v1/people:searchDirectoryPeople`. Required query parameters include `query`, `readMask`, and `sources`. Optional parameters are `mergeSources`, `pageSize`, and `pageToken`. The request body is empty. The response contains a list of matching `people`, `nextPageToken` for pagination, and `totalSize`. Requires `directory.readonly` authorization scope.\n"],null,["# Method: people.searchDirectoryPeople\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SearchDirectoryPeopleResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nProvides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.\n\n### HTTP request\n\n`GET https://people.googleapis.com/v1/people:searchDirectoryPeople`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `query` | `string` Required. Prefix query that matches fields in the person. Does NOT use the readMask for determining what fields to match. |\n| `readMask` | `string (`[FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask)` format)` Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: - addresses - ageRanges - biographies - birthdays - calendarUrls - clientData - coverPhotos - emailAddresses - events - externalIds - genders - imClients - interests - locales - locations - memberships - metadata - miscKeywords - names - nicknames - occupations - organizations - phoneNumbers - photos - relations - sipAddresses - skills - urls - userDefined |\n| `sources[]` | `enum (`[DirectorySourceType](/people/api/rest/v1/DirectorySourceType)`)` Required. Directory sources to return. |\n| `mergeSources[]` | `enum (`[DirectoryMergeSourceType](/people/api/rest/v1/DirectoryMergeSourceType)`)` Optional. Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers. |\n| `pageSize` | `integer` Optional. The number of people to include in the response. Valid values are between 1 and 500, inclusive. Defaults to 100 if not set or set to 0. |\n| `pageToken` | `string` Optional. A page token, received from a previous response [`nextPageToken`](/people/api/rest/v1/people/searchDirectoryPeople#body.SearchDirectoryPeopleResponse.FIELDS.next_page_token). Provide this to retrieve the subsequent page. When paginating, all other parameters provided to \\[`people.searchDirectoryPeople`\\]\\[google.people.v1.SearchDirectoryPeople\\] must match the first call that provided the page token. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe response to a request for people in the authenticated user's domain directory that match the specified query.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"people\": [ { object (/people/api/rest/v1/people#Person) } ], \"nextPageToken\": string, \"totalSize\": integer } ``` |\n\n| Fields ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `people[]` | `object (`[Person](/people/api/rest/v1/people#Person)`)` The list of people in the domain directory that match the query. |\n| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |\n| `totalSize` | `integer` The total number of items in the list without pagination. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/directory.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]