Method: chromeosdevices.list
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Truy xuất danh sách phân trang các thiết bị Chrome OS trong một tài khoản.
Yêu cầu HTTP
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
customerId |
string
Mã nhận dạng duy nhất cho tài khoản Google Workspace của khách hàng. Là quản trị viên tài khoản, bạn cũng có thể sử dụng bí danh my_customer để đại diện cho customerId của tài khoản. customerId cũng được trả về trong tài nguyên Người dùng.
|
Tham số truy vấn
Thông số |
maxResults |
integer
Số lượng kết quả tối đa cần trả về. Giá trị không được vượt quá 300.
|
orderBy |
enum (OrderBy )
Thuộc tính thiết bị để sử dụng cho việc sắp xếp kết quả.
|
orgUnitPath |
string
Đường dẫn đầy đủ của đơn vị tổ chức (trừ / ở đầu) hoặc mã nhận dạng duy nhất của đơn vị tổ chức đó.
|
pageToken |
string
Tham số truy vấn pageToken được dùng để yêu cầu trang kết quả truy vấn tiếp theo. Tham số truy vấn pageToken của yêu cầu tiếp theo là nextPageToken từ phản hồi trước đó của bạn.
|
projection |
enum (Projection )
Xác định xem phản hồi có chứa danh sách đầy đủ các tài sản hay chỉ một tập hợp con.
|
query |
string
Chuỗi tìm kiếm theo định dạng được cung cấp tại https://developers.google.com/workspace/admin/directory/v1/list-query-operators
|
sortOrder |
enum (SortOrder )
Liệu có trả về kết quả theo thứ tự tăng dần hay giảm dần. Phải được sử dụng với tham số orderBy .
|
includeChildOrgunits |
boolean
Trả về thiết bị từ tất cả các đơn vị tổ chức con, cũng như đơn vị tổ chức được chỉ định. Nếu bạn đặt giá trị này thành true, thì bạn phải cung cấp "orgUnitPath".
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"kind": string,
"etag": string,
"chromeosdevices": [
{
object (ChromeOsDevice )
}
],
"nextPageToken": string
} |
Trường |
kind |
string
Loại tài nguyên này.
|
etag |
string
ETag của tài nguyên.
|
chromeosdevices[] |
object (ChromeOsDevice )
Danh sách các đối tượng Thiết bị Chrome OS.
|
nextPageToken |
string
Mã thông báo dùng để truy cập vào trang tiếp theo của kết quả này. Để truy cập vào trang tiếp theo, hãy sử dụng giá trị của mã thông báo này trong chuỗi truy vấn pageToken của yêu cầu này.
|
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/admin.directory.device.chromeos
https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
OrderBy
Enum |
ANNOTATED_LOCATION |
Vị trí của thiết bị Chrome do quản trị viên chú thích. |
ANNOTATED_USER |
Người dùng Chromebook do quản trị viên chú thích. |
LAST_SYNC |
Ngày và giờ thiết bị Chrome được đồng bộ hoá lần gần đây nhất với chế độ cài đặt chính sách trong Bảng điều khiển dành cho quản trị viên. |
NOTES |
Ghi chú của quản trị viên về thiết bị Chrome. |
SERIAL_NUMBER |
Số sê-ri của thiết bị Chrome được nhập khi thiết bị được bật. |
STATUS |
Trạng thái thiết bị Chrome. Để biết thêm thông tin, hãy xem <a chromeosdevices. |
Dự đoán
Loại hình chiếu sẽ hiển thị cho các thiết bị.
Enum |
BASIC |
Chỉ bao gồm các trường siêu dữ liệu cơ bản (ví dụ: deviceId, serialNumber, status và user) |
FULL |
Bao gồm tất cả các trường siêu dữ liệu |
SortOrder
Thứ tự sắp xếp cần áp dụng cho danh sách thiết bị.
Enum |
ASCENDING |
Thứ tự tăng dần. |
DESCENDING |
Thứ tự giảm dần. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],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. |"]]