Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 75 | <h1><a href="androidenterprise_v1.html">Google Play EMM API</a> . <a href="androidenterprise_v1.devices.html">devices</a></h1> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#get">get(enterpriseId, userId, deviceId)</a></code></p> |
| 79 | <p class="firstline">Retrieves the details of a device.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#getState">getState(enterpriseId, userId, deviceId)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 82 | <p class="firstline">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.</p> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 83 | <p class="toc_element"> |
| 84 | <code><a href="#list">list(enterpriseId, userId)</a></code></p> |
| 85 | <p class="firstline">Retrieves the IDs of all of a user's devices.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#setState">setState(enterpriseId, userId, deviceId, body)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 88 | <p class="firstline">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.</p> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 89 | <h3>Method Details</h3> |
| 90 | <div class="method"> |
| 91 | <code class="details" id="get">get(enterpriseId, userId, deviceId)</code> |
| 92 | <pre>Retrieves the details of a device. |
| 93 | |
| 94 | Args: |
| 95 | enterpriseId: string, The ID of the enterprise. (required) |
| 96 | userId: string, The ID of the user. (required) |
| 97 | deviceId: string, The ID of the device. (required) |
| 98 | |
| 99 | Returns: |
| 100 | An object of the form: |
| 101 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 102 | { # A device resource represents a mobile device managed by the EMM and belonging to a specific enterprise user. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 103 | # |
| 104 | # This collection cannot be modified via the API; it is automatically populated as devices are set up to be managed. |
| 105 | "kind": "androidenterprise#device", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device". |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 106 | "managementType": "A String", # Identifies the extent to which the device is controlled by an Android for Work EMM in various deployment configurations. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame^] | 107 | # |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 108 | # Possible values include: |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame^] | 109 | # - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner, |
| 110 | # - "managedProfile", a device that has a work profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC, |
| 111 | # - "containerApp", a device running the Android for Work App. The Android for Work App is managed by the DPC, |
| 112 | # - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use Android for Work apps or Google Apps for Work, but the profile is itself not owned by a DPC. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 113 | "androidId": "A String", # The Google Play Services Android ID for the device encoded as a lowercase hex string, e.g. "123456789abcdef0". |
| 114 | }</pre> |
| 115 | </div> |
| 116 | |
| 117 | <div class="method"> |
| 118 | <code class="details" id="getState">getState(enterpriseId, userId, deviceId)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 119 | <pre>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. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 120 | |
| 121 | Args: |
| 122 | enterpriseId: string, The ID of the enterprise. (required) |
| 123 | userId: string, The ID of the user. (required) |
| 124 | deviceId: string, The ID of the device. (required) |
| 125 | |
| 126 | Returns: |
| 127 | An object of the form: |
| 128 | |
| 129 | { # The state of a user's device, as accessed by the getState and setState methods on device resources. |
| 130 | "kind": "androidenterprise#deviceState", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#deviceState". |
| 131 | "accountState": "A String", # The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state. |
| 132 | }</pre> |
| 133 | </div> |
| 134 | |
| 135 | <div class="method"> |
| 136 | <code class="details" id="list">list(enterpriseId, userId)</code> |
| 137 | <pre>Retrieves the IDs of all of a user's devices. |
| 138 | |
| 139 | Args: |
| 140 | enterpriseId: string, The ID of the enterprise. (required) |
| 141 | userId: string, The ID of the user. (required) |
| 142 | |
| 143 | Returns: |
| 144 | An object of the form: |
| 145 | |
| 146 | { # The device resources for the user. |
| 147 | "device": [ # A managed device. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 148 | { # A device resource represents a mobile device managed by the EMM and belonging to a specific enterprise user. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 149 | # |
| 150 | # This collection cannot be modified via the API; it is automatically populated as devices are set up to be managed. |
| 151 | "kind": "androidenterprise#device", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device". |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 152 | "managementType": "A String", # Identifies the extent to which the device is controlled by an Android for Work EMM in various deployment configurations. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame^] | 153 | # |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 154 | # Possible values include: |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame^] | 155 | # - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner, |
| 156 | # - "managedProfile", a device that has a work profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC, |
| 157 | # - "containerApp", a device running the Android for Work App. The Android for Work App is managed by the DPC, |
| 158 | # - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use Android for Work apps or Google Apps for Work, but the profile is itself not owned by a DPC. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 159 | "androidId": "A String", # The Google Play Services Android ID for the device encoded as a lowercase hex string, e.g. "123456789abcdef0". |
| 160 | }, |
| 161 | ], |
| 162 | "kind": "androidenterprise#devicesListResponse", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#devicesListResponse". |
| 163 | }</pre> |
| 164 | </div> |
| 165 | |
| 166 | <div class="method"> |
| 167 | <code class="details" id="setState">setState(enterpriseId, userId, deviceId, body)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 168 | <pre>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. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 169 | |
| 170 | Args: |
| 171 | enterpriseId: string, The ID of the enterprise. (required) |
| 172 | userId: string, The ID of the user. (required) |
| 173 | deviceId: string, The ID of the device. (required) |
| 174 | body: object, The request body. (required) |
| 175 | The object takes the form of: |
| 176 | |
| 177 | { # The state of a user's device, as accessed by the getState and setState methods on device resources. |
| 178 | "kind": "androidenterprise#deviceState", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#deviceState". |
| 179 | "accountState": "A String", # The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state. |
| 180 | } |
| 181 | |
| 182 | |
| 183 | Returns: |
| 184 | An object of the form: |
| 185 | |
| 186 | { # The state of a user's device, as accessed by the getState and setState methods on device resources. |
| 187 | "kind": "androidenterprise#deviceState", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#deviceState". |
| 188 | "accountState": "A String", # The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state. |
| 189 | }</pre> |
| 190 | </div> |
| 191 | |
| 192 | </body></html> |