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
- 地理位置
- memberships
- 元数据
- miscKeywords
- names
- 昵称
- 职业
- 组织
- phoneNumbers
- 照片
- 关系
- sipAddresses
- skills
- 网址
- userDefined
|
sources[] |
enum (DirectorySourceType )
必需。要返回的目录来源。
|
mergeSources[] |
enum (DirectoryMergeSourceType )
可选。要合并到目录来源的其他数据(如果这些来源通过经过验证的联接键关联,例如电子邮件地址或电话号码)。
|
pageSize |
integer
可选。要包含在响应中的用户数量。有效值介于 1 和 1000 之间(含 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
有关详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):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"]],["最后更新时间 (UTC):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"]]