Method: enterprises.devices.list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
GET https://smartdevicemanagement.googleapis.com/v1/{parent=enterprises/*}/devices
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
parent |
string
要在上層企業列出裝置。例如:「enterprises/XYZ」。
|
查詢參數
參數 |
filter |
string
選用篩選器,列出裝置。 篩選器適用於以下情況:裝置自訂名稱 (子字串比對):'customName=wing'
|
回應主體
SmartDeviceManagementService.ListDevices 回應訊息
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"devices": [
{
object (Device )
}
]
} |
欄位 |
devices[] |
object (Device )
裝置清單。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/sdm.service
詳情請參閱 OAuth 2.0 總覽。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eLists all devices managed by a given enterprise, allowing for filtering by device custom name.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/sdm.service\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eUses a \u003ccode\u003eGET\u003c/code\u003e request to the specified endpoint with the enterprise ID as a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides a list of devices in JSON format, including details for each device.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be empty, while query parameters can be used to specify filters.\u003c/p\u003e\n"]]],[],null,["# Method: enterprises.devices.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListDevicesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n\nLists devices managed by the enterprise.\n\n### HTTP request\n\n`GET https://smartdevicemanagement.googleapis.com/v1/{parent=enterprises/*}/devices`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------|\n| `parent` | `string` The parent enterprise to list devices under. E.g. \"enterprises/XYZ\". |\n\n### Query parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------------------------------------------------------------------------|\n| `filter` | `string` Optional filter to list devices. Filters can be done on: Device custom name (substring match): 'customName=wing' |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for SmartDeviceManagementService.ListDevices\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------|\n| ``` { \"devices\": [ { object (/nest/device-access/reference/rest/v1/enterprises.devices#Device) } ] } ``` |\n\n| Fields ||\n|-------------|--------------------------------------------------------------------------------------------------------------|\n| `devices[]` | `object (`[Device](/nest/device-access/reference/rest/v1/enterprises.devices#Device)`)` The list of devices. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/sdm.service`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]