Method: mobiledevices.list
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Pobiera ponumerowane listy wszystkich urządzeń mobilnych należących do użytkownika na danym koncie. Aby pobrać listę zawierającą urządzenia należące do firmy, użyj interfejsu Devices API Cloud Identity. Ta metoda kończy się po 60 minutach. Więcej informacji znajdziesz w artykule Rozwiązywanie problemów z kodami błędów.
Żądanie HTTP
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
customerId |
string
Unikalny identyfikator konta Google Workspace klienta. Jako administrator konta możesz też użyć aliasu my_customer , aby reprezentować customerId na Twoim koncie. Wartość customerId jest też zwracana w ramach zasobu Users.
|
Parametry zapytania
Parametry |
maxResults |
integer
Maksymalna liczba wyników do zwrócenia. Maksymalna dozwolona wartość to 100.
|
orderBy |
enum (OrderBy )
Właściwość urządzenia używana do sortowania wyników.
|
pageToken |
string
Token określający następną stronę na liście
|
projection |
enum (Projection )
Ograniczenie zwracania informacji do zbioru wybranych pól.
|
query |
string
Ciąg wyszukiwania w formacie podanym na stronie https://developers.google.com/workspace/admin/directory/v1/search-operators
|
sortOrder |
enum (SortOrder )
Określa, czy wyniki mają zostać zwrócone w kolejności rosnącej czy malejącej. Musi być używany z parametrem orderBy .
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
W przypadku powodzenia treść żądania zawiera dane o następującej strukturze:
Zapis JSON |
{
"kind": string,
"etag": string,
"mobiledevices": [
{
object (MobileDevice )
}
],
"nextPageToken": string
} |
Pola |
kind |
string
Rodzaj zasobu.
|
etag |
string
ETag zasobu.
|
mobiledevices[] |
object (MobileDevice )
Lista obiektów MobileDevice.
|
nextPageToken |
string
Token używany do uzyskiwania dostępu do następnej strony z tymi wynikami.
|
Zakresy autoryzacji
Wymaga jednego z tych zakresów 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
Więcej informacji znajdziesz w przewodniku dotyczącym autoryzacji.
OrderBy
Wartości w polu enum |
DEVICE_ID |
Numer seryjny urządzenia mobilnego z Google Sync. W przypadku urządzeń z Androidem jest to unikalny identyfikator wygenerowany przez oprogramowanie. |
EMAIL |
Adres e-mail właściciela urządzenia. |
LAST_SYNC |
Data i godzina ostatniej synchronizacji ustawień zasad na urządzeniu. |
MODEL |
Model urządzenia mobilnego. |
NAME |
Nazwa użytkownika właściciela urządzenia. |
OS |
System operacyjny urządzenia. |
STATUS |
Stan urządzenia. |
TYPE |
Typ urządzenia. |
Odwzorowanie
Wartości w polu enum |
BASIC |
Uwzględnia tylko podstawowe pola metadanych (np.deviceId, model, status, type i status). |
FULL |
Obejmuje wszystkie pola metadanych. |
SortOrder
Wartości w polu enum |
ASCENDING |
rosnąco; |
DESCENDING |
w kolejności malejącej. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 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. |"]]