Method: people.getBatchGet
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
リクエストされたリソース名のリストを指定して、特定のユーザーのリストに関する情報を提供します。people/me
を使用して、認証されたユーザーを指定します。
「personFields」が指定されていない場合、リクエストは 400 エラーを返します。
HTTP リクエスト
GET https://people.googleapis.com/v1/people:batchGet
この URL は gRPC Transcoding 構文を使用します。
クエリ パラメータ
パラメータ |
resourceNames[] |
string
必須。情報を提供するユーザーのリソース名。再現性があります。URL クエリ パラメータは
resourceNames=<name1>&resourceNames=<name2>&...
- 認証されたユーザーに関する情報を取得するには、
people/me を指定します。
- Google アカウントに関する情報を取得するには、
people/{account_id} を指定します。
- 連絡先に関する情報を取得するには、
people.connections.list によって返された連絡先を識別するリソース名を指定します。
リソース名は最大 200 個です。
|
requestMask (deprecated) |
object (RequestMask )
非推奨(代わりに personFields を使用してください) 結果を人物フィールドのサブセットに制限するためのマスク。
|
personFields |
string (FieldMask format)
必須。各ユーザーのどのフィールドが返されるかを制限するフィールド マスク。複数のフィールドを指定する場合は、フィールドをカンマで区切ります。指定できる値は次のとおりです。
- addresses
- ageRanges
- 伝記
- 誕生日
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- イベント
- externalIds
- 性別
- imClients
- インタレスト
- locales
- 開催地
- メンバーシップ
- メタデータ
- miscKeywords
- 名前
- ニックネーム
- 職業
- 組織
- phoneNumbers
- 写真
- 関係
- sipAddresses
- skills
- URL
- userDefined
|
sources[] |
enum (ReadSourceType )
省略可。返されるソースタイプのマスク。設定しない場合のデフォルトは READ_SOURCE_TYPE_CONTACT と READ_SOURCE_TYPE_PROFILE です。
|
リクエスト本文
リクエストの本文は空にする必要があります。
レスポンスの本文
リソース名ごとのユーザーのリストを取得する Get リクエストに対するレスポンス。
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
フィールド |
responses[] |
object (PersonResponse )
リクエストされた各リソース名に対するレスポンス。
|
認可スコープ
一般公開データにアクセスする際に認可は必要ありません。非公開データの場合は、次のいずれかの OAuth スコープが必要です。
https://www.googleapis.com/auth/contacts
https://www.googleapis.com/auth/contacts.readonly
https://www.googleapis.com/auth/contacts.other.readonly
https://www.googleapis.com/auth/directory.readonly
https://www.googleapis.com/auth/profile.agerange.read
https://www.googleapis.com/auth/profile.emails.read
https://www.googleapis.com/auth/profile.language.read
https://www.googleapis.com/auth/user.addresses.read
https://www.googleapis.com/auth/user.birthday.read
https://www.googleapis.com/auth/user.emails.read
https://www.googleapis.com/auth/user.gender.read
https://www.googleapis.com/auth/user.organization.read
https://www.googleapis.com/auth/user.phonenumbers.read
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/profile.language.read
詳しくは、認可ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-08 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-11-08 UTC。"],[[["Retrieves information about a list of specific people, including the authenticated user, by specifying resource names."],["Requires the `personFields` query parameter to specify desired data fields and returns a 400 error if it's missing."],["Supports various authorization scopes for accessing private data, although public data requires no authorization."],["Returns a JSON response containing an array of `PersonResponse` objects, each corresponding to a requested resource name."],["Uses the `GET` HTTP method and the `https://people.googleapis.com/v1/people:batchGet` endpoint with gRPC Transcoding syntax."]]],["This outlines how to retrieve information about specific people using the `people:batchGet` endpoint via a `GET` HTTP request. You must provide `resourceNames` (up to 200) in the query, identifying each person (e.g., `people/me` or `people/{account_id}`). The `personFields` parameter is required to specify which person attributes to include. The request body is empty. The response returns an array of `PersonResponse` objects, one for each requested resource name, and requires authorization scopes for private data. A 400 error is returned if 'personFields' are not provided.\n"]]