Method: people.getBatchGet
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מספקת מידע על רשימה של אנשים ספציפיים על ידי ציון רשימה של שמות המשאבים המבוקשים. משתמשים ב-people/me
כדי לציין את המשתמש המאומת.
אם לא צוין 'personFields', הבקשה תחזיר שגיאה 400.
בקשת HTTP
GET https://people.googleapis.com/v1/people:batchGet
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של שאילתה
פרמטרים |
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)
חובה. מסכת שדות כדי להגביל את השדות של כל אדם שיוחזרו. אפשר לציין כמה שדות ולהפריד ביניהם באמצעות פסיקים. הערכים החוקיים כוללים:
- כתובות
- ageRanges
- ביוגרפיות
- ימי הולדת
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- אירועים
- externalIds
- מינים
- imClients
- תחומי עניין
- locales
- locations
- מועדוני חברים
- מטא נתונים
- miscKeywords
- שמות
- כינויים
- מקצועות
- ארגונים
- phoneNumbers
- תמונות, תצלומים, צילומים, פוטוס
- יחסי
- sipAddresses
- מיומנויות
- כתובות אתרים
- userDefined
|
sources[] |
enum (ReadSourceType )
זה שינוי אופציונלי. מסכה של סוגי המקורות שיוחזרו. אם לא מגדירים את הפרמטר, ערכי ברירת המחדל שלו הם READ_SOURCE_TYPE_CONTACT ו-READ_SOURCE_TYPE_PROFILE .
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
התגובה לבקשת אחזור של רשימת אנשים לפי שם המשאב.
אם הפעולה מצליחה, גוף התגובה מכיל נתונים במבנה הבא:
שדות |
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
מידע נוסף זמין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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"]]