Method: mobiledevices.list
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ดึงข้อมูลรายการอุปกรณ์เคลื่อนที่ทั้งหมดที่ผู้ใช้เป็นเจ้าของสำหรับบัญชีหนึ่งๆ โดยแบ่งเป็นหน้า หากต้องการเรียกข้อมูลรายการที่มีอุปกรณ์ของบริษัท ให้ใช้ Devices API ของ Cloud Identity แทน โดยวิธีนี้จะหมดเวลาหลังจากผ่านไป 60 นาที โปรดดูข้อมูลเพิ่มเติมที่หัวข้อแก้ปัญหารหัสข้อผิดพลาด
คำขอ HTTP
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
customerId |
string
รหัสที่ไม่ซ้ำกันสำหรับบัญชี Google Workspace ของลูกค้า ในฐานะผู้ดูแลระบบบัญชี คุณสามารถใช้อีเมลแทน 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
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
OrderBy
Enum |
DEVICE_ID |
หมายเลขซีเรียลของอุปกรณ์เคลื่อนที่ที่ใช้ Google Sync สำหรับอุปกรณ์ Android ข้อมูลนี้เป็นตัวระบุที่ไม่ซ้ำกันซึ่งซอฟต์แวร์สร้างขึ้น |
EMAIL |
อีเมลเจ้าของอุปกรณ์ |
LAST_SYNC |
วันที่และเวลาที่ซิงค์การตั้งค่านโยบายล่าสุดของอุปกรณ์ |
MODEL |
รุ่นของอุปกรณ์เคลื่อนที่ |
NAME |
ชื่อผู้ใช้ของเจ้าของอุปกรณ์ |
OS |
ระบบปฏิบัติการของอุปกรณ์ |
STATUS |
สถานะอุปกรณ์ |
TYPE |
ประเภทของอุปกรณ์ |
การฉายภาพ
Enum |
BASIC |
มีเฉพาะช่องข้อมูลเมตาพื้นฐาน (เช่น deviceId, รุ่น, สถานะ, ประเภท และสถานะ) |
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: 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. |"]]