Method: mobiledevices.list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
擷取帳戶所有使用者擁有的行動裝置分頁清單。如要擷取包含公司擁有裝置的清單,請改用 Cloud Identity Devices API。這個方法會在 60 分鐘後逾時。詳情請參閱「排解錯誤代碼問題」。
HTTP 要求
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
customerId |
string
客戶 Google Workspace 帳戶的專屬 ID。身為帳戶管理員,您也可以使用 my_customer 別名來代表帳戶的 customerId 。系統也會在 使用者資源中傳回 customerId 。
|
查詢參數
參數 |
maxResults |
integer
要傳回的結果數上限。允許的最大值為 100。
|
orderBy |
enum (OrderBy )
用來排序結果的裝置屬性。
|
pageToken |
string
用於指定清單中下一頁的符記
|
projection |
enum (Projection )
限制系統只能將資訊傳回一組選定的欄位。
|
query |
string
搜尋字串,格式請參閱 https://developers.google.com/workspace/admin/directory/v1/search-operators
|
sortOrder |
enum (SortOrder )
指定要依遞增或遞減順序傳回結果。必須與 orderBy 參數搭配使用。
|
回應主體
JSON 表示法 |
{
"kind": string,
"etag": string,
"mobiledevices": [
{
object (MobileDevice )
}
],
"nextPageToken": string
} |
欄位 |
kind |
string
資源的類型。
|
etag |
string
資源的 ETag。
|
mobiledevices[] |
object (MobileDevice )
行動裝置物件清單。
|
nextPageToken |
string
用於存取此結果下一頁的符記。
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/admin.directory.device.mobile
https://www.googleapis.com/auth/admin.directory.device.mobile.action
https://www.googleapis.com/auth/admin.directory.device.mobile.readonly
詳情請參閱授權指南。
排序依據
列舉 |
DEVICE_ID |
Google Sync 行動裝置的序號。對於 Android 裝置,這是軟體產生的專屬 ID。 |
EMAIL |
裝置擁有者的電子郵件地址。 |
LAST_SYNC |
裝置上次同步處理政策設定的日期和時間。 |
MODEL |
行動裝置的型號。 |
NAME |
裝置擁有者的使用者名稱。 |
OS |
裝置的作業系統。 |
STATUS |
裝置狀態。 |
TYPE |
裝置的類型。 |
預測值
列舉 |
BASIC |
僅包含基本中繼資料欄位 (例如 deviceId、model、status、type 和 status) |
FULL |
包含所有中繼資料欄位 |
SortOrder
列舉 |
ASCENDING |
遞增順序。 |
DESCENDING |
遞減順序。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["# Method: mobiledevices.list\n\nRetrieves a paginated list of all user-owned mobile devices for an account. To retrieve a list that includes company-owned devices, use the Cloud Identity [Devices API](https://cloud.google.com/identity/docs/concepts/overview-devices) instead. This method times out after 60 minutes. For more information, see [Troubleshoot error codes](https://developers.google.com/workspace/admin/directory/v1/guides/troubleshoot-error-codes).\n\n### HTTP request\n\n`GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile`\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. Max allowed value is 100. |\n| `orderBy` | `enum (`[OrderBy](/workspace/admin/directory/reference/rest/v1/mobiledevices/list#OrderBy)`)` Device property to use for sorting results. |\n| `pageToken` | `string` Token to specify next page in the list |\n| `projection` | `enum (`[Projection](/workspace/admin/directory/reference/rest/v1/mobiledevices/list#Projection)`)` Restrict information returned to a set of selected fields. |\n| `query` | `string` Search string in the format given at \u003chttps://developers.google.com/workspace/admin/directory/v1/search-operators\u003e |\n| `sortOrder` | `enum (`[SortOrder](/workspace/admin/directory/reference/rest/v1/mobiledevices/list#SortOrder)`)` Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter. |\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, \"mobiledevices\": [ { object (/workspace/admin/directory/reference/rest/v1/mobiledevices#MobileDevice) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Kind of resource this is. |\n| `etag` | `string` ETag of the resource. |\n| `mobiledevices[]` | `object (`[MobileDevice](/workspace/admin/directory/reference/rest/v1/mobiledevices#MobileDevice)`)` A list of Mobile Device objects. |\n| `nextPageToken` | `string` Token used to access next page of this result. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/admin.directory.device.mobile`\n- `\n https://www.googleapis.com/auth/admin.directory.device.mobile.action`\n- `\n https://www.googleapis.com/auth/admin.directory.device.mobile.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nOrderBy\n-------\n\n| Enums ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------|\n| `DEVICE_ID` | The serial number for a Google Sync mobile device. For Android devices, this is a software generated unique identifier. |\n| `EMAIL` | The device owner's email address. |\n| `LAST_SYNC` | Last policy settings sync date time of the device. |\n| `MODEL` | The mobile device's model. |\n| `NAME` | The device owner's user name. |\n| `OS` | The device's operating system. |\n| `STATUS` | The device status. |\n| `TYPE` | Type of the device. |\n\nProjection\n----------\n\n| Enums ||\n|---------|-------------------------------------------------------------------------------------------|\n| `BASIC` | Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status) |\n| `FULL` | Includes all metadata fields |\n\nSortOrder\n---------\n\n| Enums ||\n|--------------|-------------------|\n| `ASCENDING` | Ascending order. |\n| `DESCENDING` | Descending order. |"]]