Method: mobiledevices.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 gồm tất cả thiết bị di động do người dùng sở hữu cho một tài khoản. Để truy xuất danh sách bao gồm các thiết bị thuộc sở hữu của công ty, hãy sử dụng API Thiết bị của Cloud Identity. Phương thức này hết thời gian chờ sau 60 phút. Để biết thêm thông tin, hãy xem bài viết Khắc phục sự cố về mã lỗi.
Yêu cầu HTTP
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile
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ị tối đa được phép là 100.
|
orderBy |
enum (OrderBy )
Thuộc tính thiết bị để sử dụng cho việc sắp xếp kết quả.
|
pageToken |
string
Mã thông báo để chỉ định trang tiếp theo trong danh sách
|
projection |
enum (Projection )
Hạn chế thông tin được trả về một tập hợp các trường đã chọn.
|
query |
string
Chuỗi tìm kiếm ở định dạng được cung cấp tại https://developers.google.com/workspace/admin/directory/v1/search-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 .
|
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,
"mobiledevices": [
{
object (MobileDevice )
}
],
"nextPageToken": string
} |
Trường |
kind |
string
Loại tài nguyên này.
|
etag |
string
ETag của tài nguyên.
|
mobiledevices[] |
object (MobileDevice )
Danh sách các đối tượng Thiết bị di động.
|
nextPageToken |
string
Mã thông báo dùng để truy cập trang tiếp theo của kết quả 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.mobile
https://www.googleapis.com/auth/admin.directory.device.mobile.action
https://www.googleapis.com/auth/admin.directory.device.mobile.readonly
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
OrderBy
Enum |
DEVICE_ID |
Số sê-ri của thiết bị di động dùng Google Sync. Đối với thiết bị Android, đây là giá trị nhận dạng duy nhất do phần mềm tạo. |
EMAIL |
Địa chỉ email của chủ sở hữu thiết bị. |
LAST_SYNC |
Ngày giờ đồng bộ hoá chế độ cài đặt chính sách gần đây nhất của thiết bị. |
MODEL |
Kiểu máy của thiết bị di động. |
NAME |
Tên người dùng của chủ sở hữu thiết bị. |
OS |
Hệ điều hành của thiết bị. |
STATUS |
Trạng thái thiết bị. |
TYPE |
Loại thiết bị. |
Dự đoán
Enum |
BASIC |
Chỉ bao gồm các trường siêu dữ liệu cơ bản (ví dụ: deviceId, model, status, type và status) |
FULL |
Bao gồm tất cả các trường siêu dữ liệu |
SortOrder
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: 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. |"]]