Method: mobiledevices.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
检索某个账号的所有用户拥有的移动设备的分页列表。如需检索包含公司自有设备的列表,请改用 Cloud Identity Devices API。此方法会在 60 分钟后超时。如需了解详情,请参阅排查错误代码。
HTTP 请求
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile
网址采用 gRPC 转码语法。
路径参数
参数 |
customerId |
string
客户 Google Workspace 账号的唯一 ID。作为账号管理员,您还可以使用 my_customer 别名来表示账号的 customerId 。customerId 也会作为“用户”资源的一部分返回。
|
查询参数
参数 |
maxResults |
integer
返回的结果数上限。允许的最大值为 100。
|
orderBy |
enum (OrderBy )
用于对结果进行排序的设备属性。
|
pageToken |
string
用于指定列表中下一页的令牌
|
projection |
enum (Projection )
限制返回给一组选定字段的信息。
|
query |
string
搜索字符串,格式如下:https://developers.google.com/workspace/admin/directory/v1/search-operators
|
sortOrder |
enum (SortOrder )
是按升序还是降序返回结果。必须与 orderBy 参数搭配使用。
|
响应正文
JSON 表示法 |
{
"kind": string,
"etag": string,
"mobiledevices": [
{
object (MobileDevice )
}
],
"nextPageToken": string
} |
字段 |
kind |
string
资源的类型。
|
etag |
string
资源的 ETag。
|
mobiledevices[] |
object (MobileDevice )
移动设备对象的列表。
|
nextPageToken |
string
用于访问此结果的下一页的令牌。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/admin.directory.device.mobile
https://www.googleapis.com/auth/admin.directory.device.mobile.action
https://www.googleapis.com/auth/admin.directory.device.mobile.readonly
如需了解详情,请参阅授权指南。
OrderBy
枚举 |
DEVICE_ID |
Google 同步移动设备的序列号。对于 Android 设备,这是软件生成的唯一标识符。 |
EMAIL |
设备所有者的电子邮件地址。 |
LAST_SYNC |
设备上次同步政策设置的日期时间。 |
MODEL |
移动设备的型号。 |
NAME |
设备所有者的用户名。 |
OS |
设备的操作系统。 |
STATUS |
设备状态。 |
TYPE |
设备类型。 |
投影
枚举 |
BASIC |
仅包含基本元数据字段(例如 deviceId、型号、状态、类型和状态) |
FULL |
包含所有元数据字段 |
SortOrder
枚举 |
ASCENDING |
升序。 |
DESCENDING |
降序。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Method: mobiledevices.list\n\nRetrieves a paginated list of all user-owned mobile devices for an account. To retrieve a list that includes company-owned devices, use the Cloud Identity [Devices API](https://cloud.google.com/identity/docs/concepts/overview-devices) instead. This method times out after 60 minutes. For more information, see [Troubleshoot error codes](https://developers.google.com/workspace/admin/directory/v1/guides/troubleshoot-error-codes).\n\n### HTTP request\n\n`GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customerId` | `string` The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](https://developers.google.com/workspace/admin/directory/v1/reference/users). |\n\n### Query parameters\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `maxResults` | `integer` Maximum number of results to return. Max allowed value is 100. |\n| `orderBy` | `enum (`[OrderBy](/workspace/admin/directory/reference/rest/v1/mobiledevices/list#OrderBy)`)` Device property to use for sorting results. |\n| `pageToken` | `string` Token to specify next page in the list |\n| `projection` | `enum (`[Projection](/workspace/admin/directory/reference/rest/v1/mobiledevices/list#Projection)`)` Restrict information returned to a set of selected fields. |\n| `query` | `string` Search string in the format given at \u003chttps://developers.google.com/workspace/admin/directory/v1/search-operators\u003e |\n| `sortOrder` | `enum (`[SortOrder](/workspace/admin/directory/reference/rest/v1/mobiledevices/list#SortOrder)`)` Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"etag\": string, \"mobiledevices\": [ { object (/workspace/admin/directory/reference/rest/v1/mobiledevices#MobileDevice) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Kind of resource this is. |\n| `etag` | `string` ETag of the resource. |\n| `mobiledevices[]` | `object (`[MobileDevice](/workspace/admin/directory/reference/rest/v1/mobiledevices#MobileDevice)`)` A list of Mobile Device objects. |\n| `nextPageToken` | `string` Token used to access next page of this result. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/admin.directory.device.mobile`\n- `\n https://www.googleapis.com/auth/admin.directory.device.mobile.action`\n- `\n https://www.googleapis.com/auth/admin.directory.device.mobile.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nOrderBy\n-------\n\n| Enums ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------|\n| `DEVICE_ID` | The serial number for a Google Sync mobile device. For Android devices, this is a software generated unique identifier. |\n| `EMAIL` | The device owner's email address. |\n| `LAST_SYNC` | Last policy settings sync date time of the device. |\n| `MODEL` | The mobile device's model. |\n| `NAME` | The device owner's user name. |\n| `OS` | The device's operating system. |\n| `STATUS` | The device status. |\n| `TYPE` | Type of the device. |\n\nProjection\n----------\n\n| Enums ||\n|---------|-------------------------------------------------------------------------------------------|\n| `BASIC` | Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status) |\n| `FULL` | Includes all metadata fields |\n\nSortOrder\n---------\n\n| Enums ||\n|--------------|-------------------|\n| `ASCENDING` | Ascending order. |\n| `DESCENDING` | Descending order. |"]]