Devices

For a list of methods for this resource, see the end of this page.

Resource representations

A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.

{
  "kind": "androidenterprise#device",
  "androidId": string,
  "managementType": string,
  "policy": {
    "autoUpdatePolicy": string,
    "productAvailabilityPolicy": string,
    "productPolicy": [
      {
        "productId": string,
        "tracks": [
          string
        ],
        "trackIds": [
          string
        ],
        "managedConfiguration": {
          "kind": "androidenterprise#managedConfiguration",
          "productId": string,
          "managedProperty": [
            {
              "key": string,
              "valueBool": boolean,
              "valueInteger": integer,
              "valueString": string,
              "valueStringArray": [
                string
              ],
              "valueBundle": {
                "managedProperty": [
                  (ManagedProperty)
                ]
              },
              "valueBundleArray": [
                {
                  "managedProperty": [
                    (ManagedProperty)
                  ]
                }
              ]
            }
          ],
          "configurationVariables": {
            "kind": "androidenterprise#configurationVariables",
            "mcmId": string,
            "variableSet": [
              {
                "kind": "androidenterprise#variableSet",
                "placeholder": string,
                "userValue": string
              }
            ]
          }
        },
        "autoInstallPolicy": {
          "autoInstallMode": string,
          "autoInstallPriority": integer,
          "autoInstallConstraint": [
            {
              "networkTypeConstraint": string,
              "chargingStateConstraint": string,
              "deviceIdleStateConstraint": string
            }
          ],
          "minimumVersionCode": integer
        }
      }
    ],
    "maintenanceWindow": {
      "startTimeAfterMidnightMs": long,
      "durationMs": long
    },
    "deviceReportPolicy": string
  },
  "report": {
    "lastUpdatedTimestampMillis": long,
    "appState": [
      {
        "packageName": string,
        "keyedAppState": [
          {
            "key": string,
            "stateTimestampMillis": long,
            "severity": string,
            "message": string,
            "data": string
          }
        ]
      }
    ]
  }
}
Property name Value Description Notes
androidId string The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, "123456789abcdef0".
kind string Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device".
managementType string Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations.

Possible values include:
  • "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner.
  • "managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC.
  • "containerApp", no longer used (deprecated).
  • "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC.


Acceptable values are:
  • "containerApp"
  • "managedDevice"
  • "managedProfile"
  • "unmanagedProfile"
policy nested object The policy enforced on the device.
policy.autoUpdatePolicy string The auto-update policy for apps installed on the device. "choiceToTheUser" allows the device's user to configure the app update policy. "always" enables auto updates. "never" disables auto updates. "wifiOnly" enables auto updates only when the device is connected to wifi.

Acceptable values are:
  • "always"
  • "choiceToTheUser"
  • "never"
  • "wifiOnly"
policy.deviceReportPolicy string Whether the device reports app states to the EMM. The default value is "deviceReportDisabled".

Acceptable values are:
  • "deviceReportDisabled"
  • "deviceReportEnabled"
policy.maintenanceWindow nested object The maintenance window defining when apps running in the foreground should be updated.
policy.maintenanceWindow.durationMs long Duration of the maintenance window, in milliseconds. The duration must be between 30 minutes and 24 hours (inclusive).
policy.maintenanceWindow.startTimeAfterMidnightMs long Start time of the maintenance window, in milliseconds after midnight on the device. Windows can span midnight.
policy.productAvailabilityPolicy string The availability granted to the device for the specified products. "all" gives the device access to all products, regardless of approval status. "all" does not enable automatic visibility of "alpha" or "beta" tracks. "whitelist" grants the device access the products specified in productPolicy[]. Only products that are approved or products that were previously approved (products with revoked approval) by the enterprise can be whitelisted. If no value is provided, the availability set at the user level is applied by default.

Acceptable values are:
  • "all"
  • "whitelist"
policy.productPolicy[] list The list of product policies.
policy.productPolicy[].autoInstallPolicy nested object The auto-install policy for the product.
policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[] list The constraints for auto-installing the app. You can specify a maximum of one constraint.

policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[].chargingStateConstraint string Charging state constraint.

Acceptable values are:
  • "chargingNotRequired"
  • "chargingRequired"
policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[].deviceIdleStateConstraint string Device idle state constraint.

Acceptable values are:
  • "deviceIdleNotRequired"
  • "deviceIdleRequired"
policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[].networkTypeConstraint string Network type constraint.

Acceptable values are:
  • "anyNetwork"
  • "unmeteredNetwork"
policy.productPolicy[].autoInstallPolicy.autoInstallMode string The auto-install mode. If unset defaults to "doNotAutoInstall".

Acceptable values are:
  • "autoInstallOnce"
  • "doNotAutoInstall"
  • "forceAutoInstall"
policy.productPolicy[].autoInstallPolicy.autoInstallPriority integer The priority of the install, as an unsigned integer. A lower number means higher priority.
policy.productPolicy[].autoInstallPolicy.minimumVersionCode integer The minimum version of the app. If a lower version of the app is installed, then the app will be auto-updated according to the auto-install constraints, instead of waiting for the regular auto-update.
policy.productPolicy[].managedConfiguration nested object The managed configuration for the product.
policy.productPolicy[].managedConfiguration.configurationVariables nested object Contains the ID of the managed configuration profile and the set of configuration variables (if any) defined for the user.
policy.productPolicy[].managedConfiguration.configurationVariables.kind string Identifies what kind of resource this is. Value: the fixed string "androidenterprise#configurationVariables".
policy.productPolicy[].managedConfiguration.configurationVariables.mcmId string The ID of the managed configurations settings.
policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[] list The variable set that is attributed to the user.
policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[].kind string Identifies what kind of resource this is. Value: the fixed string "androidenterprise#variableSet".
policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[].placeholder string The placeholder string; defined by EMM.
policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[].userValue string The value of the placeholder, specific to the user.
policy.productPolicy[].managedConfiguration.kind string Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfiguration".
policy.productPolicy[].managedConfiguration.managedProperty[] list The set of managed properties for this configuration.
policy.productPolicy[].managedConfiguration.managedProperty[].key string The unique key that identifies the property.
policy.productPolicy[].managedConfiguration.managedProperty[].valueBool boolean The boolean value - this will only be present if type of the property is bool.
policy.productPolicy[].managedConfiguration.managedProperty[].valueBundle nested object The bundle of managed properties - this will only be present if type of the property is bundle.
policy.productPolicy[].managedConfiguration.managedProperty[].valueBundle.managedProperty[] list The list of managed properties.
policy.productPolicy[].managedConfiguration.managedProperty[].valueBundleArray[] list The list of bundles of properties - this will only be present if type of the property is bundle_array.
policy.productPolicy[].managedConfiguration.managedProperty[].valueBundleArray[].managedProperty[] list The list of managed properties.
policy.productPolicy[].managedConfiguration.managedProperty[].valueInteger integer The integer value - this will only be present if type of the property is integer.
policy.productPolicy[].managedConfiguration.managedProperty[].valueString string The string value - this will only be present if type of the property is string, choice or hidden.
policy.productPolicy[].managedConfiguration.managedProperty[].valueStringArray[] list The list of string values - this will only be present if type of the property is multiselect.
policy.productPolicy[].managedConfiguration.productId string The ID of the product that the managed configuration is for, e.g. "app:com.google.android.gm".
policy.productPolicy[].productId string The ID of the product. For example, "app:com.google.android.gm".
policy.productPolicy[].trackIds[] list Grants the device visibility to the specified product release track(s), identified by trackIds. The list of release tracks of a product can be obtained by calling Products.Get.
policy.productPolicy[].tracks[] list Deprecated. Use trackIds instead.
report nested object The device report updated with the latest app states.
report.appState[] list List of app states set by managed apps on the device. App states are defined by the app's developers. This field will always be present.
report.appState[].keyedAppState[] list List of keyed app states. This field will always be present.
report.appState[].keyedAppState[].data string Additional field intended for machine-readable data. For example, a number or JSON object. To prevent XSS, we recommend removing any HTML from the data before displaying it.
report.appState[].keyedAppState[].key string Key indicating what the app is providing a state for. The content of the key is set by the app's developer. To prevent XSS, we recommend removing any HTML from the key before displaying it. This field will always be present.
report.appState[].keyedAppState[].message string Free-form, human-readable message describing the app state. For example, an error message. To prevent XSS, we recommend removing any HTML from the message before displaying it.
report.appState[].keyedAppState[].severity string Severity of the app state. This field will always be present.

Acceptable values are:
  • "severityError"
  • "severityInfo"
report.appState[].keyedAppState[].stateTimestampMillis long Timestamp of when the app set the state in milliseconds since epoch. This field will always be present.
report.appState[].packageName string The package name of the app. This field will always be present.
report.lastUpdatedTimestampMillis long The timestamp of the last report update in milliseconds since epoch. This field will always be present.

Methods

forceReportUpload
Uploads a report containing any changes in app states on the device since the last report was generated. You can call this method up to 3 times every 24 hours for a given device.
get
Retrieves the details of a device.
getState
Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.
list
Retrieves the IDs of all of a user's devices.
patch
Updates the device policy. This method supports patch semantics.
setState
Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.
update
Updates the device policy

Оставить отзыв о...

Текущей странице
Google Play EMM API