mobiledevices
Creates, updates, deletes, gets or lists a mobiledevices
resource.
Overview
Name | mobiledevices |
Type | Resource |
Id | googleadmin.directory.mobiledevices |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | array | The list of the owner's user names. If your application needs the current list of device owner names, use the get method. For more information about retrieving mobile device user information, see the Developer's Guide. |
adbStatus | boolean | Adb (USB debugging) enabled or disabled on device (Read-only) |
applications | array | The list of applications installed on an Android mobile device. It is not applicable to Google Sync and iOS devices. The list includes any Android applications that access Google Workspace data. When updating an applications list, it is important to note that updates replace the existing list. If the Android device has two existing applications and the API updates the list with five applications, the is now the updated list of five applications. |
basebandVersion | string | The device's baseband version. |
bootloaderVersion | string | Mobile Device Bootloader version (Read-only) |
brand | string | Mobile Device Brand (Read-only) |
buildNumber | string | The device's operating system build number. |
defaultLanguage | string | The default locale used on the device. |
developerOptionsStatus | boolean | Developer options enabled or disabled on device (Read-only) |
deviceCompromisedStatus | string | The compromised device status. |
deviceId | string | The serial number for a Google Sync mobile device. For Android and iOS devices, this is a software generated unique identifier. |
devicePasswordStatus | string | DevicePasswordStatus (Read-only) |
email | array | The list of the owner's email addresses. If your application needs the current list of user emails, use the get method. For additional information, see the retrieve a user method. |
encryptionStatus | string | Mobile Device Encryption Status (Read-only) |
etag | string | ETag of the resource. |
firstSync | string (date-time) | Date and time the device was first synchronized with the policy settings in the G Suite administrator control panel (Read-only) |
hardware | string | Mobile Device Hardware (Read-only) |
hardwareId | string | The IMEI/MEID unique identifier for Android hardware. It is not applicable to Google Sync devices. When adding an Android mobile device, this is an optional property. When updating one of these devices, this is a read-only property. |
imei | string | The device's IMEI number. |
kernelVersion | string | The device's kernel version. |
kind | string | The type of the API resource. For Mobiledevices resources, the value is admin#directory#mobiledevice . (default: admin#directory#mobiledevice) |
lastSync | string (date-time) | Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only) |
managedAccountIsOnOwnerProfile | boolean | Boolean indicating if this account is on owner/primary profile or not. |
manufacturer | string | Mobile Device manufacturer (Read-only) |
meid | string | The device's MEID number. |
model | string | The mobile device's model name, for example Nexus S. This property can be updated. For more information, see the Developer's Guide. |
networkOperator | string | Mobile Device mobile or network operator (if available) (Read-only) |
os | string | The mobile device's operating system, for example IOS 4.3 or Android 2.3.5. This property can be updated. For more information, see the Developer's Guide. |
otherAccountsInfo | array | The list of accounts added on device (Read-only) |
privilege | string | DMAgentPermission (Read-only) |
releaseVersion | string | Mobile Device release version version (Read-only) |
resourceId | string | The unique ID the API service uses to identify the mobile device. |
securityPatchLevel | string (int64) | Mobile Device Security patch level (Read-only) |
serialNumber | string | The device's serial number. |
status | string | The device's status. |
supportsWorkProfile | boolean | Work profile supported on device (Read-only) |
type | string | The type of mobile device. |
unknownSourcesStatus | boolean | Unknown sources enabled or disabled on device (Read-only) |
userAgent | string | Gives information about the device such as os version. This property can be updated. For more information, see the Developer's Guide. |
wifiMacAddress | string | The device's MAC address on Wi-Fi networks. |
Successful response
Name | Datatype | Description |
---|---|---|
name | array | The list of the owner's user names. If your application needs the current list of device owner names, use the get method. For more information about retrieving mobile device user information, see the Developer's Guide. |
adbStatus | boolean | Adb (USB debugging) enabled or disabled on device (Read-only) |
applications | array | The list of applications installed on an Android mobile device. It is not applicable to Google Sync and iOS devices. The list includes any Android applications that access Google Workspace data. When updating an applications list, it is important to note that updates replace the existing list. If the Android device has two existing applications and the API updates the list with five applications, the is now the updated list of five applications. |
basebandVersion | string | The device's baseband version. |
bootloaderVersion | string | Mobile Device Bootloader version (Read-only) |
brand | string | Mobile Device Brand (Read-only) |
buildNumber | string | The device's operating system build number. |
defaultLanguage | string | The default locale used on the device. |
developerOptionsStatus | boolean | Developer options enabled or disabled on device (Read-only) |
deviceCompromisedStatus | string | The compromised device status. |
deviceId | string | The serial number for a Google Sync mobile device. For Android and iOS devices, this is a software generated unique identifier. |
devicePasswordStatus | string | DevicePasswordStatus (Read-only) |
email | array | The list of the owner's email addresses. If your application needs the current list of user emails, use the get method. For additional information, see the retrieve a user method. |
encryptionStatus | string | Mobile Device Encryption Status (Read-only) |
etag | string | ETag of the resource. |
firstSync | string (date-time) | Date and time the device was first synchronized with the policy settings in the G Suite administrator control panel (Read-only) |
hardware | string | Mobile Device Hardware (Read-only) |
hardwareId | string | The IMEI/MEID unique identifier for Android hardware. It is not applicable to Google Sync devices. When adding an Android mobile device, this is an optional property. When updating one of these devices, this is a read-only property. |
imei | string | The device's IMEI number. |
kernelVersion | string | The device's kernel version. |
kind | string | The type of the API resource. For Mobiledevices resources, the value is admin#directory#mobiledevice . (default: admin#directory#mobiledevice) |
lastSync | string (date-time) | Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only) |
managedAccountIsOnOwnerProfile | boolean | Boolean indicating if this account is on owner/primary profile or not. |
manufacturer | string | Mobile Device manufacturer (Read-only) |
meid | string | The device's MEID number. |
model | string | The mobile device's model name, for example Nexus S. This property can be updated. For more information, see the Developer's Guide. |
networkOperator | string | Mobile Device mobile or network operator (if available) (Read-only) |
os | string | The mobile device's operating system, for example IOS 4.3 or Android 2.3.5. This property can be updated. For more information, see the Developer's Guide. |
otherAccountsInfo | array | The list of accounts added on device (Read-only) |
privilege | string | DMAgentPermission (Read-only) |
releaseVersion | string | Mobile Device release version version (Read-only) |
resourceId | string | The unique ID the API service uses to identify the mobile device. |
securityPatchLevel | string (int64) | Mobile Device Security patch level (Read-only) |
serialNumber | string | The device's serial number. |
status | string | The device's status. |
supportsWorkProfile | boolean | Work profile supported on device (Read-only) |
type | string | The type of mobile device. |
unknownSourcesStatus | boolean | Unknown sources enabled or disabled on device (Read-only) |
userAgent | string | Gives information about the device such as os version. This property can be updated. For more information, see the Developer's Guide. |
wifiMacAddress | string | The device's MAC address on Wi-Fi networks. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | customerId , resourceId | projection | Retrieves a mobile device's properties. |
list | select | customerId | maxResults , orderBy , pageToken , projection , query , sortOrder | Retrieves 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 instead. This method times out after 60 minutes. For more information, see Troubleshoot error codes. |
delete | delete | customerId , resourceId | Removes a mobile device. | |
action | exec | customerId , resourceId | Takes an action that affects a mobile device. For example, remotely wiping a device. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
customerId | string | |
resourceId | string | |
maxResults | integer (int32) | |
orderBy | string | |
pageToken | string | |
projection | string | |
query | string | |
sortOrder | string |
SELECT
examples
- get
- list
Retrieves a mobile device's properties.
SELECT
name,
adbStatus,
applications,
basebandVersion,
bootloaderVersion,
brand,
buildNumber,
defaultLanguage,
developerOptionsStatus,
deviceCompromisedStatus,
deviceId,
devicePasswordStatus,
email,
encryptionStatus,
etag,
firstSync,
hardware,
hardwareId,
imei,
kernelVersion,
kind,
lastSync,
managedAccountIsOnOwnerProfile,
manufacturer,
meid,
model,
networkOperator,
os,
otherAccountsInfo,
privilege,
releaseVersion,
resourceId,
securityPatchLevel,
serialNumber,
status,
supportsWorkProfile,
type,
unknownSourcesStatus,
userAgent,
wifiMacAddress
FROM googleadmin.directory.mobiledevices
WHERE customerId = '{{ customerId }}' -- required
AND resourceId = '{{ resourceId }}' -- required
AND projection = '{{ projection }}';
Retrieves 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 instead. This method times out after 60 minutes. For more information, see Troubleshoot error codes.
SELECT
name,
adbStatus,
applications,
basebandVersion,
bootloaderVersion,
brand,
buildNumber,
defaultLanguage,
developerOptionsStatus,
deviceCompromisedStatus,
deviceId,
devicePasswordStatus,
email,
encryptionStatus,
etag,
firstSync,
hardware,
hardwareId,
imei,
kernelVersion,
kind,
lastSync,
managedAccountIsOnOwnerProfile,
manufacturer,
meid,
model,
networkOperator,
os,
otherAccountsInfo,
privilege,
releaseVersion,
resourceId,
securityPatchLevel,
serialNumber,
status,
supportsWorkProfile,
type,
unknownSourcesStatus,
userAgent,
wifiMacAddress
FROM googleadmin.directory.mobiledevices
WHERE customerId = '{{ customerId }}' -- required
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND projection = '{{ projection }}'
AND query = '{{ query }}'
AND sortOrder = '{{ sortOrder }}';
DELETE
examples
- delete
Removes a mobile device.
DELETE FROM googleadmin.directory.mobiledevices
WHERE customerId = '{{ customerId }}' --required
AND resourceId = '{{ resourceId }}' --required;
Lifecycle Methods
- action
Takes an action that affects a mobile device. For example, remotely wiping a device.
EXEC googleadmin.directory.mobiledevices.action
@customerId='{{ customerId }}' --required,
@resourceId='{{ resourceId }}' --required
@@json=
'{
"action": "{{ action }}"
}';