Method: people.listDirectoryPeople
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
GET https://people.googleapis.com/v1/people:listDirectoryPeople
這個網址使用 gRPC 轉碼語法。
查詢參數
參數 |
readMask |
string (FieldMask format)
必要欄位。欄位遮罩會限制傳回的每位使用者欄位。您可以使用半形逗號分隔多個欄位。有效值如下:
- addresses
- ageRanges
- 傳記
- 生日
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- 活動
- externalIds
- 性別
- imClients
- 興趣
- locales
- 位置
- 會籍
- 中繼資料
- miscKeywords
- 名稱
- 暱稱
- 職業
- 機構組織
- phoneNumbers
- 相片
- 關係
- sipAddresses
- skills
- 網址
- userDefined
|
sources[] |
enum (DirectorySourceType )
必要欄位。要傳回的目錄來源。
|
mergeSources[] |
enum (DirectoryMergeSourceType )
選用設定。如透過已驗證的彙整鍵 (例如電子郵件地址或電話號碼) 連結,則可將其他資料合併至目錄來源。
|
pageSize |
integer
選用設定。要加入回應的人數。有效值介於 1 到 1000 之間 (含首尾)。如果未設定或已設定為 0,預設值為 100。
|
pageToken |
string
選用設定。從先前回應 nextPageToken 收到的網頁權杖。提供此項目即可擷取後續網頁。 進行分頁時,提供至 people.listDirectoryPeople 的所有其他參數須與提供網頁權杖的第一個呼叫相符。
|
requestSyncToken |
boolean
選用設定。回應是否應傳回 nextSyncToken 。您可以將其設為要求 syncToken ,藉此取得自上次要求以來的累進變更。 如要進一步瞭解同步行為,請參閱 people.listDirectoryPeople 。
|
syncToken |
string
選用設定。從先前的回應接收的同步處理權杖nextSyncToken 提供這項資訊,即可只擷取自上次要求後變更的資源。 同步處理時,提供給 people.listDirectoryPeople 的所有其他參數都必須與提供同步權杖的第一個呼叫相符。 如要進一步瞭解同步處理行為,請前往 people.listDirectoryPeople 。
|
回應主體
對已驗證使用者網域目錄的要求回應。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"people": [
{
object (Person )
}
],
"nextPageToken": string,
"nextSyncToken": string
} |
欄位 |
people[] |
object (Person )
網域目錄中的使用者清單。
|
nextPageToken |
string
可做為 pageToken 傳送的權杖,用於擷取後續網頁。如果省略這個欄位,就不會有後續頁面。
|
nextSyncToken |
string
可做為 syncToken 傳送的權杖,用來擷取自上次要求以來的變更。要求必須設定 requestSyncToken 才能傳回同步處理權杖。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/directory.readonly
詳情請參閱授權指南。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-08 (世界標準時間)。
[[["容易理解","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 (世界標準時間)。"],[[["Lists domain profiles and contacts within the authenticated user's domain directory."],["Allows for filtering and pagination of results using query parameters like `readMask`, `sources`, `pageSize`, `pageToken`, and `syncToken`."],["Supports incremental synchronization to retrieve changes since the last request using the `syncToken` and `requestSyncToken` parameters."],["Returns a list of `Person` objects containing directory information, along with pagination and synchronization tokens."],["Requires the `https://www.googleapis.com/auth/directory.readonly` OAuth scope for authorization."]]],["This outlines how to list domain profiles and contacts via a `GET` request to `https://people.googleapis.com/v1/people:listDirectoryPeople`. Key actions include specifying `readMask`, `sources`, `mergeSources`, `pageSize`, `pageToken`, `requestSyncToken`, and `syncToken` as query parameters. An empty request body is required. The response, containing an array of `people`, `nextPageToken`, and `nextSyncToken` fields, allows for pagination and synchronization of changes. The `https://www.googleapis.com/auth/directory.readonly` authorization scope is required.\n"]]