Method: people.searchDirectoryPeople
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
فهرستی از نمایه های دامنه و مخاطبین دامنه را در فهرست دامنه کاربر تأیید شده ارائه می دهد که با عبارت جستجو مطابقت دارند.
درخواست HTTP
GET https://people.googleapis.com/v1/people:searchDirectoryPeople
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای پرس و جو
پارامترها |
---|
query | string مورد نیاز. پرس و جوی پیشوندی که با فیلدهای شخص مطابقت دارد. از readMask برای تعیین فیلدهای مطابقت استفاده نمی کند. |
readMask | string ( FieldMask format) مورد نیاز. یک فیلد ماسک برای محدود کردن اینکه کدام فیلد برای هر فرد بازگردانده می شود. چندین فیلد را می توان با جدا کردن آنها با کاما مشخص کرد. مقادیر معتبر عبارتند از: - آدرس ها
- محدوده سنی
- بیوگرافی ها
- تولدها
- calendarUrls
- کلاینت دیتا
- جلدعکس ها
- آدرس های ایمیل
- رویدادها
- شناسه های خارجی
- جنسیت ها
- imClients
- منافع
- مناطق
- مکان ها
- عضویت ها
- ابرداده
- کلمات کلیدی اشتباه
- نام ها
- نام مستعار
- مشاغل
- سازمان ها
- شماره تلفن
- عکس ها
- روابط
- آدرس های sip
- مهارت ها
- آدرس های اینترنتی
- userDefined
|
sources[] | enum ( DirectorySourceType ) مورد نیاز. منابع دایرکتوری برای بازگشت. |
mergeSources[] | enum ( DirectoryMergeSourceType ) اختیاری. دادههای اضافی برای ادغام در منابع دایرکتوری اگر از طریق کلیدهای اتصال تأیید شده مانند آدرسهای ایمیل یا شماره تلفن وصل شده باشند. |
pageSize | integer اختیاری. تعداد افرادی که در پاسخ باید لحاظ شود. مقادیر معتبر شامل 1 تا 500 است. در صورت تنظیم نشدن، 100 پیشفرض میشود یا روی 0 تنظیم میشود. |
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 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-14 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-11-14 بهوقت ساعت هماهنگ جهانی."],[[["\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)."]]