Method: mobiledevices.list
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אחזור רשימה מחולקת לדפים של כל המכשירים הניידים שבבעלות המשתמש בחשבון. כדי לאחזר רשימה שכוללת מכשירים בבעלות החברה, צריך להשתמש ב-Devices API של Cloud Identity. הזמן הקצוב לתפוגה של השיטה הזו הוא 60 דקות. מידע נוסף זמין במאמר פתרון בעיות שקשורות לקודי שגיאה.
בקשת HTTP
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile
כתובת ה-URL משתמשת בתחביר של Transcoding של 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 )
רשימה של אובייקטים מסוג Mobile Device.
|
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, model, status, type ו-status) |
FULL |
כולל את כל שדות המטא-נתונים |
SortOrder
טיפוסים בני מנייה (enum) |
ASCENDING |
סדר עולה. |
DESCENDING |
בסדר יורד. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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. |"]]