Admin SDK API . mobiledevices

Instance Methods

action(customerId, resourceId, body=None, x__xgafv=None)

Takes an action that affects a mobile device. For example, remotely wiping a device.

close()

Close httplib2 connections.

delete(customerId, resourceId, x__xgafv=None)

Removes a mobile device.

get(customerId, resourceId, projection=None, x__xgafv=None)

Retrieves a mobile device's properties.

list(customerId, sortOrder=None, query=None, orderBy=None, pageToken=None, projection=None, maxResults=None, x__xgafv=None)

Retrieves a paginated list of all mobile devices for an account.

list_next(previous_request, previous_response)

Retrieves the next page of results.

Method Details

action(customerId, resourceId, body=None, x__xgafv=None)
Takes an action that affects a mobile device. For example, remotely wiping a device.

Args:
  customerId: string, The unique ID for the customer's G Suite 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](/admin-sdk/directory/v1/reference/users). (required)
  resourceId: string, The unique ID the API service uses to identify the mobile device. (required)
  body: object, The request body.
    The object takes the form of:

{
    "action": "A String", # The action to be performed on the device.
  }

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format
close()
Close httplib2 connections.
delete(customerId, resourceId, x__xgafv=None)
Removes a mobile device.

Args:
  customerId: string, The unique ID for the customer's G Suite 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](/admin-sdk/directory/v1/reference/users). (required)
  resourceId: string, The unique ID the API service uses to identify the mobile device. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format
get(customerId, resourceId, projection=None, x__xgafv=None)
Retrieves a mobile device's properties.

Args:
  customerId: string, The unique ID for the customer's G Suite 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](/admin-sdk/directory/v1/reference/users). (required)
  resourceId: string, The unique ID the API service uses to identify the mobile device. (required)
  projection: string, Restrict information returned to a set of selected fields.
    Allowed values
      PROJECTION_UNDEFINED - 
      BASIC - Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)
      FULL - Includes all metadata fields
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # G Suite Mobile Management includes Android, [Google Sync](http://support.google.com/a/bin/answer.py?answer=135937), and iOS devices. For more information about common group mobile device API tasks, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-mobile-devices.html).
    "wifiMacAddress": "A String", # The device's MAC address on Wi-Fi networks.
    "brand": "A String", # Mobile Device Brand (Read-only)
    "os": "A String", # The mobile device's operating system, for example IOS 4.3 or Android 2.3.5. This property can be [updated](/admin-sdk/directory/v1/reference/mobiledevices/update.html). For more information, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-mobile-devices#update_mobile_device).
    "type": "A String", # The type of mobile device.
    "buildNumber": "A String", # The device's operating system build number.
    "hardware": "A String", # Mobile Device Hardware (Read-only)
    "deviceId": "A String", # The serial number for a Google Sync mobile device. For Android and iOS devices, this is a software generated unique identifier.
    "status": "A String", # The device's status.
    "otherAccountsInfo": [ # List of accounts added on device (Read-only)
      "A String",
    ],
    "etag": "A String", # ETag of the resource.
    "name": [ # List of the owner's user names. If your application needs the current list of device owner names, use the [get](/admin-sdk/directory/v1/reference/mobiledevices/get.html) method. For more information about retrieving mobile device user information, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-users#get_user).
      "A String",
    ],
    "privilege": "A String", # DMAgentPermission (Read-only)
    "resourceId": "A String", # The unique ID the API service uses to identify the mobile device.
    "bootloaderVersion": "A String", # Mobile Device Bootloader version (Read-only)
    "manufacturer": "A String", # Mobile Device manufacturer (Read-only)
    "kernelVersion": "A String", # The device's kernel version.
    "securityPatchLevel": "A String", # Mobile Device Security patch level (Read-only)
    "model": "A String", # The mobile device's model name, for example Nexus S. This property can be [updated](/admin-sdk/directory/v1/reference/mobiledevices/update.html). For more information, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-mobile=devices#update_mobile_device).
    "imei": "A String", # The device's IMEI number.
    "meid": "A String", # The device's MEID number.
    "userAgent": "A String", # Gives information about the device such as `os` version. This property can be [updated](/admin-sdk/directory/v1/reference/mobiledevices/update.html). For more information, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-mobile-devices#update_mobile_device).
    "firstSync": "A String", # Date and time the device was first synchronized with the policy settings in the G Suite administrator control panel (Read-only)
    "kind": "admin#directory#mobiledevice", # The type of the API resource. For Mobiledevices resources, the value is `admin#directory#mobiledevice`.
    "managedAccountIsOnOwnerProfile": True or False, # Boolean indicating if this account is on owner/primary profile or not.
    "developerOptionsStatus": True or False, # Developer options enabled or disabled on device (Read-only)
    "releaseVersion": "A String", # Mobile Device release version version (Read-only)
    "supportsWorkProfile": True or False, # Work profile supported on device (Read-only)
    "defaultLanguage": "A String", # The default locale used on the device.
    "serialNumber": "A String", # The device's serial number.
    "encryptionStatus": "A String", # Mobile Device Encryption Status (Read-only)
    "networkOperator": "A String", # Mobile Device mobile or network operator (if available) (Read-only)
    "devicePasswordStatus": "A String", # DevicePasswordStatus (Read-only)
    "deviceCompromisedStatus": "A String", # The compromised device status.
    "hardwareId": "A 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.
    "basebandVersion": "A String", # The device's baseband version.
    "unknownSourcesStatus": True or False, # Unknown sources enabled or disabled on device (Read-only)
    "applications": [ # 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 G Suite 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.
      {
        "versionCode": 42, # The application's version code. An example is `13`.
        "permission": [ # The list of permissions of this application. These can be either a standard Android permission or one defined by the application, and are found in an application's [Android manifest](http://developer.android.com/guide/topics/manifest/uses-permission-element.html). Examples of a Calendar application's permissions are `READ_CALENDAR`, or `MANAGE_ACCOUNTS`.
          "A String",
        ],
        "displayName": "A String", # The application's display name. An example is `Browser`.
        "versionName": "A String", # The application's version name. An example is `3.2-140714`.
        "packageName": "A String", # The application's package name. An example is `com.android.browser`.
      },
    ],
    "email": [ # List of owner's email addresses. If your application needs the current list of user emails, use the [get](/admin-sdk/directory/v1/reference/mobiledevices/get.html) method. For additional information, see the [retrieve a user](/admin-sdk/directory/v1/guides/manage-users#get_user) method.
      "A String",
    ],
    "adbStatus": True or False, # Adb (USB debugging) enabled or disabled on device (Read-only)
    "lastSync": "A String", # Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only)
  }
list(customerId, sortOrder=None, query=None, orderBy=None, pageToken=None, projection=None, maxResults=None, x__xgafv=None)
Retrieves a paginated list of all mobile devices for an account.

Args:
  customerId: string, The unique ID for the customer's G Suite 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](/admin-sdk/directory/v1/reference/users). (required)
  sortOrder: string, Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter.
    Allowed values
      SORT_ORDER_UNDEFINED - 
      ASCENDING - Ascending order.
      DESCENDING - Descending order.
  query: string, Search string in the format given at http://support.google.com/a/bin/answer.py?answer=1408863#search
  orderBy: string, Device property to use for sorting results.
    Allowed values
      orderByUndefined - 
      deviceId - The serial number for a Google Sync mobile device. For Android devices, this is a software generated unique identifier.
      email - The device owner's email address.
      lastSync - Last policy settings sync date time of the device.
      model - The mobile device's model.
      name - The device owner's user name.
      os - The device's operating system.
      status - The device status.
      type - Type of the device.
  pageToken: string, Token to specify next page in the list
  projection: string, Restrict information returned to a set of selected fields.
    Allowed values
      PROJECTION_UNDEFINED - 
      BASIC - Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)
      FULL - Includes all metadata fields
  maxResults: integer, Maximum number of results to return. Max allowed value is 100.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
    "mobiledevices": [ # List of Mobile Device objects.
      { # G Suite Mobile Management includes Android, [Google Sync](http://support.google.com/a/bin/answer.py?answer=135937), and iOS devices. For more information about common group mobile device API tasks, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-mobile-devices.html).
        "wifiMacAddress": "A String", # The device's MAC address on Wi-Fi networks.
        "brand": "A String", # Mobile Device Brand (Read-only)
        "os": "A String", # The mobile device's operating system, for example IOS 4.3 or Android 2.3.5. This property can be [updated](/admin-sdk/directory/v1/reference/mobiledevices/update.html). For more information, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-mobile-devices#update_mobile_device).
        "type": "A String", # The type of mobile device.
        "buildNumber": "A String", # The device's operating system build number.
        "hardware": "A String", # Mobile Device Hardware (Read-only)
        "deviceId": "A String", # The serial number for a Google Sync mobile device. For Android and iOS devices, this is a software generated unique identifier.
        "status": "A String", # The device's status.
        "otherAccountsInfo": [ # List of accounts added on device (Read-only)
          "A String",
        ],
        "etag": "A String", # ETag of the resource.
        "name": [ # List of the owner's user names. If your application needs the current list of device owner names, use the [get](/admin-sdk/directory/v1/reference/mobiledevices/get.html) method. For more information about retrieving mobile device user information, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-users#get_user).
          "A String",
        ],
        "privilege": "A String", # DMAgentPermission (Read-only)
        "resourceId": "A String", # The unique ID the API service uses to identify the mobile device.
        "bootloaderVersion": "A String", # Mobile Device Bootloader version (Read-only)
        "manufacturer": "A String", # Mobile Device manufacturer (Read-only)
        "kernelVersion": "A String", # The device's kernel version.
        "securityPatchLevel": "A String", # Mobile Device Security patch level (Read-only)
        "model": "A String", # The mobile device's model name, for example Nexus S. This property can be [updated](/admin-sdk/directory/v1/reference/mobiledevices/update.html). For more information, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-mobile=devices#update_mobile_device).
        "imei": "A String", # The device's IMEI number.
        "meid": "A String", # The device's MEID number.
        "userAgent": "A String", # Gives information about the device such as `os` version. This property can be [updated](/admin-sdk/directory/v1/reference/mobiledevices/update.html). For more information, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-mobile-devices#update_mobile_device).
        "firstSync": "A String", # Date and time the device was first synchronized with the policy settings in the G Suite administrator control panel (Read-only)
        "kind": "admin#directory#mobiledevice", # The type of the API resource. For Mobiledevices resources, the value is `admin#directory#mobiledevice`.
        "managedAccountIsOnOwnerProfile": True or False, # Boolean indicating if this account is on owner/primary profile or not.
        "developerOptionsStatus": True or False, # Developer options enabled or disabled on device (Read-only)
        "releaseVersion": "A String", # Mobile Device release version version (Read-only)
        "supportsWorkProfile": True or False, # Work profile supported on device (Read-only)
        "defaultLanguage": "A String", # The default locale used on the device.
        "serialNumber": "A String", # The device's serial number.
        "encryptionStatus": "A String", # Mobile Device Encryption Status (Read-only)
        "networkOperator": "A String", # Mobile Device mobile or network operator (if available) (Read-only)
        "devicePasswordStatus": "A String", # DevicePasswordStatus (Read-only)
        "deviceCompromisedStatus": "A String", # The compromised device status.
        "hardwareId": "A 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.
        "basebandVersion": "A String", # The device's baseband version.
        "unknownSourcesStatus": True or False, # Unknown sources enabled or disabled on device (Read-only)
        "applications": [ # 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 G Suite 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.
          {
            "versionCode": 42, # The application's version code. An example is `13`.
            "permission": [ # The list of permissions of this application. These can be either a standard Android permission or one defined by the application, and are found in an application's [Android manifest](http://developer.android.com/guide/topics/manifest/uses-permission-element.html). Examples of a Calendar application's permissions are `READ_CALENDAR`, or `MANAGE_ACCOUNTS`.
              "A String",
            ],
            "displayName": "A String", # The application's display name. An example is `Browser`.
            "versionName": "A String", # The application's version name. An example is `3.2-140714`.
            "packageName": "A String", # The application's package name. An example is `com.android.browser`.
          },
        ],
        "email": [ # List of owner's email addresses. If your application needs the current list of user emails, use the [get](/admin-sdk/directory/v1/reference/mobiledevices/get.html) method. For additional information, see the [retrieve a user](/admin-sdk/directory/v1/guides/manage-users#get_user) method.
          "A String",
        ],
        "adbStatus": True or False, # Adb (USB debugging) enabled or disabled on device (Read-only)
        "lastSync": "A String", # Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only)
      },
    ],
    "etag": "A String", # ETag of the resource.
    "nextPageToken": "A String", # Token used to access next page of this result.
    "kind": "admin#directory#mobiledevices", # Kind of resource this is.
  }
list_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.