Method: people.searchDirectoryPeople
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
השירות מספק רשימה של פרופילים בדומיין ואנשי קשר בדומיין שמתאימים לשאילתת החיפוש, בספריית הדומיין של המשתמש המאומת.
בקשת HTTP
GET https://people.googleapis.com/v1/people:searchDirectoryPeople
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של שאילתה
פרמטרים |
query |
string
חובה. תחילית של שאילתה שתואמת לשדות של האדם. לא משתמש ב-readMask כדי לקבוע לאילו שדות להתאים.
|
readMask |
string (FieldMask format)
חובה. מסכת שדות להגבלת השדות בכל משתמש. כדי לציין כמה שדות, צריך להפריד ביניהם באמצעות פסיקים. הערכים החוקיים כוללים:
- כתובות
- ageRanges
- ביוגרפיות
- ימי הולדת
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- אירועים
- externalIds
- מינים
- imClients
- תחומי עניין
- locales
- locations
- מינויים
- מטא נתונים
- miscKeywords
- שמות
- כינויים
- מקצועות
- ארגונים
- phoneNumbers
- תמונות, תצלומים, צילומים, פוטוס
- יחסי
- sipAddresses
- מיומנויות
- כתובות אתרים
- 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
מידע נוסף זמין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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)."]]