Method: chromeosdevices.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos
网址采用 gRPC 转码语法。
路径参数
参数 |
customerId |
string
客户 Google Workspace 账号的唯一 ID。作为账号管理员,您还可以使用 my_customer 别名来表示账号的 customerId 。customerId 也会作为“用户”资源的一部分返回。
|
查询参数
参数 |
maxResults |
integer
返回的结果数上限。值不得超过 300。
|
orderBy |
enum (OrderBy )
用于对结果进行排序的设备属性。
|
orgUnitPath |
string
组织部门的完整路径(不含前面的 / )或其唯一 ID。
|
pageToken |
string
pageToken 查询参数用于请求下一页查询结果。下一个请求的 pageToken 查询参数是上一个响应中的 nextPageToken 。
|
projection |
enum (Projection )
确定响应是否包含完整的房源列表,还是仅包含部分房源。
|
query |
string
搜索字符串,格式如下:https://developers.google.com/workspace/admin/directory/v1/list-query-operators
|
sortOrder |
enum (SortOrder )
是按升序还是降序返回结果。必须与 orderBy 参数搭配使用。
|
includeChildOrgunits |
boolean
返回所有子组织部门以及指定组织部门中的设备。如果将此值设置为 true,则必须提供“orgUnitPath”。
|
响应正文
JSON 表示法 |
{
"kind": string,
"etag": string,
"chromeosdevices": [
{
object (ChromeOsDevice )
}
],
"nextPageToken": string
} |
字段 |
kind |
string
资源的类型。
|
etag |
string
资源的 ETag。
|
chromeosdevices[] |
object (ChromeOsDevice )
ChromeOSDevice 对象的列表。
|
nextPageToken |
string
用于访问此结果的下一页的令牌。如需访问下一页,请在此请求的 pageToken 查询字符串中使用此令牌的值。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/admin.directory.device.chromeos
https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly
如需了解详情,请参阅授权指南。
OrderBy
枚举 |
ANNOTATED_LOCATION |
管理员注释的 Chrome 设备位置。 |
ANNOTATED_USER |
管理员注释的 Chromebook 用户。 |
LAST_SYNC |
Chrome 设备上次与管理控制台中的政策设置进行同步的日期和时间。 |
NOTES |
管理员注释的 Chrome 设备说明。 |
SERIAL_NUMBER |
设备启用时输入的 Chrome 设备序列号。 |
STATUS |
Chrome 设备状态。如需了解详情,请参阅 <a chromeosdevices。 |
投影
枚举 |
BASIC |
仅包含基本元数据字段(例如 deviceId、serialNumber、status 和 user) |
FULL |
包含所有元数据字段 |
SortOrder
枚举 |
ASCENDING |
升序。 |
DESCENDING |
降序。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Method: chromeosdevices.list\n\nRetrieves a paginated list of Chrome OS devices within an account.\n\n### HTTP request\n\n`GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos`\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. Value should not exceed 300. |\n| `orderBy` | `enum (`[OrderBy](/workspace/admin/directory/reference/rest/v1/chromeosdevices/list#OrderBy)`)` Device property to use for sorting results. |\n| `orgUnitPath` | `string` The full path of the organizational unit (minus the leading `/`) or its unique ID. |\n| `pageToken` | `string` The `pageToken` query parameter is used to request the next page of query results. The follow-on request's `pageToken` query parameter is the `nextPageToken` from your previous response. |\n| `projection` | `enum (`[Projection](/workspace/admin/directory/reference/rest/v1/chromeosdevices/list#Projection)`)` Determines whether the response contains the full list of properties or only a subset. |\n| `query` | `string` Search string in the format given at \u003chttps://developers.google.com/workspace/admin/directory/v1/list-query-operators\u003e |\n| `sortOrder` | `enum (`[SortOrder](/workspace/admin/directory/reference/rest/v1/chromeosdevices/list#SortOrder)`)` Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter. |\n| `includeChildOrgunits` | `boolean` Return devices from all child orgunits, as well as the specified org unit. If this is set to true, 'orgUnitPath' must be provided. |\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, \"chromeosdevices\": [ { object (/workspace/admin/directory/reference/rest/v1/chromeosdevices#ChromeOsDevice) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Kind of resource this is. |\n| `etag` | `string` ETag of the resource. |\n| `chromeosdevices[]` | `object (`[ChromeOsDevice](/workspace/admin/directory/reference/rest/v1/chromeosdevices#ChromeOsDevice)`)` A list of Chrome OS Device objects. |\n| `nextPageToken` | `string` Token used to access the next page of this result. To access the next page, use this token's value in the `pageToken` query string of this request. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/admin.directory.device.chromeos`\n- `\n https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nOrderBy\n-------\n\n| Enums ||\n|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ANNOTATED_LOCATION` | Chrome device location as annotated by the administrator. |\n| `ANNOTATED_USER` | Chromebook user as annotated by administrator. |\n| `LAST_SYNC` | The date and time the Chrome device was last synchronized with the policy settings in the Admin console. |\n| `NOTES` | Chrome device notes as annotated by the administrator. |\n| `SERIAL_NUMBER` | The Chrome device serial number entered when the device was enabled. |\n| `STATUS` | Chrome device status. For more information, see the \\\u003ca [chromeosdevices](https://developers.google.com/workspace/admin/directory/v1/reference/chromeosdevices.html). |\n\nProjection\n----------\n\nThe type of projection to show for the devices.\n\n| Enums ||\n|---------|------------------------------------------------------------------------------------------|\n| `BASIC` | Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user) |\n| `FULL` | Includes all metadata fields |\n\nSortOrder\n---------\n\nThe sorting order that should be applied to the device list.\n\n| Enums ||\n|--------------|-------------------|\n| `ASCENDING` | Ascending order. |\n| `DESCENDING` | Descending order. |"]]