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 )
Chrome OS 裝置物件清單。
|
nextPageToken |
string
用於存取此結果下一頁的符記。如要存取下一頁,請在這個要求的 pageToken 查詢字串中使用這個符記的值。
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/admin.directory.device.chromeos
https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly
詳情請參閱授權指南。
排序依據
列舉 |
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 |
遞減順序。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]