Method: chromeosdevices.list
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ดึงข้อมูลรายการอุปกรณ์ Chrome OS แบบแบ่งหน้าภายในบัญชี
คำขอ HTTP
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
customerId |
string
รหัสที่ไม่ซ้ำกันสำหรับบัญชี Google Workspace ของลูกค้า ในฐานะผู้ดูแลระบบบัญชี คุณสามารถใช้อีเมลแทน my_customer เพื่อแสดง customerId ของบัญชีได้เช่นกัน ระบบจะแสดงผล customerId เป็นส่วนหนึ่งของทรัพยากรผู้ใช้ด้วย
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
maxResults |
integer
จำนวนผลลัพธ์สูงสุดที่จะแสดง ค่าต้องไม่เกิน 300
|
orderBy |
enum (OrderBy )
พร็อพเพอร์ตี้อุปกรณ์ที่จะใช้จัดเรียงผลลัพธ์
|
orgUnitPath |
string
เส้นทางแบบเต็มที่ไปยังหน่วยขององค์กร (ไม่รวม / ที่อยู่ด้านหน้า) หรือรหัสที่ไม่ซ้ำกัน
|
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
แสดงผลอุปกรณ์จากหน่วยขององค์กรย่อยทั้งหมด รวมถึงหน่วยขององค์กรที่ระบุ หากตั้งค่านี้เป็น "จริง" จะต้องระบุ "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
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
OrderBy
Enum |
ANNOTATED_LOCATION |
ตำแหน่งอุปกรณ์ Chrome ตามที่ผู้ดูแลระบบกำกับเนื้อหาไว้ |
ANNOTATED_USER |
ผู้ใช้ Chromebook ตามที่ผู้ดูแลระบบกำกับเนื้อหาไว้ |
LAST_SYNC |
วันที่และเวลาที่อุปกรณ์ Chrome ทำการซิงค์กับการตั้งค่านโยบายในคอนโซลผู้ดูแลระบบครั้งล่าสุด |
NOTES |
หมายเหตุเกี่ยวกับอุปกรณ์ Chrome ที่ผู้ดูแลระบบกำกับเนื้อหาไว้ |
SERIAL_NUMBER |
หมายเลขซีเรียลของอุปกรณ์ Chrome ที่ป้อนเมื่อเปิดใช้อุปกรณ์ |
STATUS |
สถานะอุปกรณ์ Chrome ดูข้อมูลเพิ่มเติมได้ที่ <a chromeosdevices |
การฉายภาพ
ประเภทการฉายภาพที่จะแสดงสำหรับอุปกรณ์
Enum |
BASIC |
รวมเฉพาะฟิลด์ข้อมูลเมตาพื้นฐาน (เช่น deviceId, serialNumber, status และ user) |
FULL |
รวมช่องข้อมูลเมตาทั้งหมด |
SortOrder
ลําดับการจัดเรียงที่ควรใช้กับรายการอุปกรณ์
Enum |
ASCENDING |
เรียงลำดับจากน้อยไปมาก |
DESCENDING |
เรียงลำดับจากมากไปน้อย |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 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. |"]]