devices
Creates, updates, deletes, gets or lists a devices
resource.
Overview
Name | devices |
Type | Resource |
Id | google.cloudidentity.devices |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the Device in format: devices/{device} , where device is the unique id assigned to the Device. Important: Device API scopes require that you use domain-wide delegation to access the API. For more information, see Set up the Devices API. |
androidSpecificAttributes | object | Output only. Attributes specific to Android devices. (id: GoogleAppsCloudidentityDevicesV1AndroidAttributes) |
assetTag | string | Asset tag of the device. |
basebandVersion | string | Output only. Baseband version of the device. |
bootloaderVersion | string | Output only. Device bootloader version. Example: 0.6.7. |
brand | string | Output only. Device brand. Example: Samsung. |
buildNumber | string | Output only. Build number of the device. |
compromisedState | string | Output only. Represents whether the Device is compromised. |
createTime | string (google-datetime) | Output only. When the Company-Owned device was imported. This field is empty for BYOD devices. |
deviceId | string | Unique identifier for the device. |
deviceType | string | Output only. Type of device. |
enabledDeveloperOptions | boolean | Output only. Whether developer options is enabled on device. |
enabledUsbDebugging | boolean | Output only. Whether USB debugging is enabled on device. |
encryptionState | string | Output only. Device encryption state. |
endpointVerificationSpecificAttributes | object | Output only. Attributes specific to Endpoint Verification devices. (id: GoogleAppsCloudidentityDevicesV1EndpointVerificationSpecificAttributes) |
hostname | string | Host name of the device. |
imei | string | Output only. IMEI number of device if GSM device; empty otherwise. |
kernelVersion | string | Output only. Kernel version of the device. |
lastSyncTime | string (google-datetime) | Most recent time when device synced with this service. |
managementState | string | Output only. Management state of the device |
manufacturer | string | Output only. Device manufacturer. Example: Motorola. |
meid | string | Output only. MEID number of device if CDMA device; empty otherwise. |
model | string | Output only. Model name of device. Example: Pixel 3. |
networkOperator | string | Output only. Mobile or network operator of device, if available. |
osVersion | string | Output only. OS version of the device. Example: Android 8.1.0. |
otherAccounts | array | Output only. Domain name for Google accounts on device. Type for other accounts on device. On Android, will only be populated if |ownership_privilege| is |PROFILE_OWNER| or |DEVICE_OWNER|. Does not include the account signed in to the device policy app if that account's domain has only one account. Examples: "com.example", "xyz.com". |
ownerType | string | Output only. Whether the device is owned by the company or an individual |
releaseVersion | string | Output only. OS release version. Example: 6.0. |
securityPatchTime | string (google-datetime) | Output only. OS security patch update time on device. |
serialNumber | string | Serial Number of device. Example: HT82V1A01076. |
unifiedDeviceId | string | Output only. Unified device id of the device. |
wifiMacAddresses | array | WiFi MAC addresses of device. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the Device in format: devices/{device} , where device is the unique id assigned to the Device. Important: Device API scopes require that you use domain-wide delegation to access the API. For more information, see Set up the Devices API. |
androidSpecificAttributes | object | Output only. Attributes specific to Android devices. (id: GoogleAppsCloudidentityDevicesV1AndroidAttributes) |
assetTag | string | Asset tag of the device. |
basebandVersion | string | Output only. Baseband version of the device. |
bootloaderVersion | string | Output only. Device bootloader version. Example: 0.6.7. |
brand | string | Output only. Device brand. Example: Samsung. |
buildNumber | string | Output only. Build number of the device. |
compromisedState | string | Output only. Represents whether the Device is compromised. |
createTime | string (google-datetime) | Output only. When the Company-Owned device was imported. This field is empty for BYOD devices. |
deviceId | string | Unique identifier for the device. |
deviceType | string | Output only. Type of device. |
enabledDeveloperOptions | boolean | Output only. Whether developer options is enabled on device. |
enabledUsbDebugging | boolean | Output only. Whether USB debugging is enabled on device. |
encryptionState | string | Output only. Device encryption state. |
endpointVerificationSpecificAttributes | object | Output only. Attributes specific to Endpoint Verification devices. (id: GoogleAppsCloudidentityDevicesV1EndpointVerificationSpecificAttributes) |
hostname | string | Host name of the device. |
imei | string | Output only. IMEI number of device if GSM device; empty otherwise. |
kernelVersion | string | Output only. Kernel version of the device. |
lastSyncTime | string (google-datetime) | Most recent time when device synced with this service. |
managementState | string | Output only. Management state of the device |
manufacturer | string | Output only. Device manufacturer. Example: Motorola. |
meid | string | Output only. MEID number of device if CDMA device; empty otherwise. |
model | string | Output only. Model name of device. Example: Pixel 3. |
networkOperator | string | Output only. Mobile or network operator of device, if available. |
osVersion | string | Output only. OS version of the device. Example: Android 8.1.0. |
otherAccounts | array | Output only. Domain name for Google accounts on device. Type for other accounts on device. On Android, will only be populated if |ownership_privilege| is |PROFILE_OWNER| or |DEVICE_OWNER|. Does not include the account signed in to the device policy app if that account's domain has only one account. Examples: "com.example", "xyz.com". |
ownerType | string | Output only. Whether the device is owned by the company or an individual |
releaseVersion | string | Output only. OS release version. Example: 6.0. |
securityPatchTime | string (google-datetime) | Output only. OS security patch update time on device. |
serialNumber | string | Serial Number of device. Example: HT82V1A01076. |
unifiedDeviceId | string | Output only. Unified device id of the device. |
wifiMacAddresses | array | WiFi MAC addresses of device. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | devicesId | customer | Retrieves the specified device. |
list | select | customer , filter , pageSize , pageToken , orderBy , view | Lists/Searches devices. | |
create | insert | customer | Creates a device. Only company-owned device may be created. Note: This method is available only to customers who have one of the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium | |
delete | delete | devicesId | customer | Deletes the specified device. |
wipe | exec | devicesId | Wipes all data on the specified device. | |
cancel_wipe | exec | devicesId | Cancels an unfinished device wipe. This operation can be used to cancel device wipe in the gap between the wipe operation returning success and the device being wiped. This operation is possible when the device is in a "pending wipe" state. The device enters the "pending wipe" state when a wipe device command is issued, but has not yet been sent to the device. The cancel wipe will fail if the wipe command has already been issued to the 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 |
---|---|---|
devicesId | string | |
customer | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
view | string |
SELECT
examples
- get
- list
Retrieves the specified device.
SELECT
name,
androidSpecificAttributes,
assetTag,
basebandVersion,
bootloaderVersion,
brand,
buildNumber,
compromisedState,
createTime,
deviceId,
deviceType,
enabledDeveloperOptions,
enabledUsbDebugging,
encryptionState,
endpointVerificationSpecificAttributes,
hostname,
imei,
kernelVersion,
lastSyncTime,
managementState,
manufacturer,
meid,
model,
networkOperator,
osVersion,
otherAccounts,
ownerType,
releaseVersion,
securityPatchTime,
serialNumber,
unifiedDeviceId,
wifiMacAddresses
FROM google.cloudidentity.devices
WHERE devicesId = '{{ devicesId }}' -- required
AND customer = '{{ customer }}';
Lists/Searches devices.
SELECT
name,
androidSpecificAttributes,
assetTag,
basebandVersion,
bootloaderVersion,
brand,
buildNumber,
compromisedState,
createTime,
deviceId,
deviceType,
enabledDeveloperOptions,
enabledUsbDebugging,
encryptionState,
endpointVerificationSpecificAttributes,
hostname,
imei,
kernelVersion,
lastSyncTime,
managementState,
manufacturer,
meid,
model,
networkOperator,
osVersion,
otherAccounts,
ownerType,
releaseVersion,
securityPatchTime,
serialNumber,
unifiedDeviceId,
wifiMacAddresses
FROM google.cloudidentity.devices
WHERE customer = '{{ customer }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}';
INSERT
examples
- create
- Manifest
Creates a device. Only company-owned device may be created. Note: This method is available only to customers who have one of the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium
INSERT INTO google.cloudidentity.devices (
data__lastSyncTime,
data__serialNumber,
data__assetTag,
data__wifiMacAddresses,
data__deviceId,
data__hostname,
customer
)
SELECT
'{{ lastSyncTime }}',
'{{ serialNumber }}',
'{{ assetTag }}',
'{{ wifiMacAddresses }}',
'{{ deviceId }}',
'{{ hostname }}',
'{{ customer }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: devices
props:
- name: lastSyncTime
value: string
description: >
Most recent time when device synced with this service.
- name: serialNumber
value: string
description: >
Serial Number of device. Example: HT82V1A01076.
- name: assetTag
value: string
description: >
Asset tag of the device.
- name: wifiMacAddresses
value: array
description: >
WiFi MAC addresses of device.
- name: deviceId
value: string
description: >
Unique identifier for the device.
- name: hostname
value: string
description: >
Host name of the device.
- name: customer
value: string
DELETE
examples
- delete
Deletes the specified device.
DELETE FROM google.cloudidentity.devices
WHERE devicesId = '{{ devicesId }}' --required
AND customer = '{{ customer }}';
Lifecycle Methods
- wipe
- cancel_wipe
Wipes all data on the specified device.
EXEC google.cloudidentity.devices.wipe
@devicesId='{{ devicesId }}' --required
@@json=
'{
"customer": "{{ customer }}",
"removeResetLock": {{ removeResetLock }}
}';
Cancels an unfinished device wipe. This operation can be used to cancel device wipe in the gap between the wipe operation returning success and the device being wiped. This operation is possible when the device is in a "pending wipe" state. The device enters the "pending wipe" state when a wipe device command is issued, but has not yet been sent to the device. The cancel wipe will fail if the wipe command has already been issued to the device.
EXEC google.cloudidentity.devices.cancel_wipe
@devicesId='{{ devicesId }}' --required
@@json=
'{
"customer": "{{ customer }}"
}';