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.users.html">users</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="#generateToken">generateToken(enterpriseId, userId)</a></code></p> |
| 79 | <p class="firstline">Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#get">get(enterpriseId, userId)</a></code></p> |
| 82 | <p class="firstline">Retrieves a user's details.</p> |
| 83 | <p class="toc_element"> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 84 | <code><a href="#getAvailableProductSet">getAvailableProductSet(enterpriseId, userId)</a></code></p> |
| 85 | <p class="firstline">Retrieves the set of products a user is entitled to access.</p> |
| 86 | <p class="toc_element"> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 87 | <code><a href="#list">list(enterpriseId, email)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 88 | <p class="firstline">Looks up a user by their primary email address.</p> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 89 | <p class="toc_element"> |
| 90 | <code><a href="#revokeToken">revokeToken(enterpriseId, userId)</a></code></p> |
| 91 | <p class="firstline">Revokes a previously generated token (activation code) for the user.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 92 | <p class="toc_element"> |
| 93 | <code><a href="#setAvailableProductSet">setAvailableProductSet(enterpriseId, userId, body)</a></code></p> |
| 94 | <p class="firstline">Modifies the set of products a user is entitled to access.</p> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
| 97 | <code class="details" id="generateToken">generateToken(enterpriseId, userId)</code> |
| 98 | <pre>Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token. |
| 99 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 100 | This call only works with Google managed accounts. |
| 101 | |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 102 | Args: |
| 103 | enterpriseId: string, The ID of the enterprise. (required) |
| 104 | userId: string, The ID of the user. (required) |
| 105 | |
| 106 | Returns: |
| 107 | An object of the form: |
| 108 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 109 | { # A UserToken is used by a user when setting up a managed device or profile with their work account on a device. When the user enters their email address and token (activation code) the appropriate EMM app can be automatically downloaded. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 110 | "kind": "androidenterprise#userToken", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#userToken". |
| 111 | "userId": "A String", # The unique ID for the user. |
| 112 | "token": "A String", # The token (activation code) to be entered by the user. This consists of a sequence of decimal digits. Note that the leading digit may be 0. |
| 113 | }</pre> |
| 114 | </div> |
| 115 | |
| 116 | <div class="method"> |
| 117 | <code class="details" id="get">get(enterpriseId, userId)</code> |
| 118 | <pre>Retrieves a user's details. |
| 119 | |
| 120 | Args: |
| 121 | enterpriseId: string, The ID of the enterprise. (required) |
| 122 | userId: string, The ID of the user. (required) |
| 123 | |
| 124 | Returns: |
| 125 | An object of the form: |
| 126 | |
| 127 | { # A user resource represents an individual user within the enterprise's domain. |
| 128 | # |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 129 | # Note that each user is associated with a Google account based on the user's corporate email address (which must be in one of the enterprise's domains). As part of installing the EMM's DPC app to manage a device the Google account must be provisioned to the device, and so the user resource must be created before that. This can be done using the Google Admin SDK Directory API. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 130 | # |
| 131 | # The ID for a user is an opaque string. It can be retrieved using the list method queried by the user's primary email address. |
| 132 | "kind": "androidenterprise#user", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user". |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 133 | "primaryEmail": "A String", # The user's primary email, e.g. "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 134 | "id": "A String", # The unique ID for the user. |
| 135 | }</pre> |
| 136 | </div> |
| 137 | |
| 138 | <div class="method"> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 139 | <code class="details" id="getAvailableProductSet">getAvailableProductSet(enterpriseId, userId)</code> |
| 140 | <pre>Retrieves the set of products a user is entitled to access. |
| 141 | |
| 142 | Args: |
| 143 | enterpriseId: string, The ID of the enterprise. (required) |
| 144 | userId: string, The ID of the user. (required) |
| 145 | |
| 146 | Returns: |
| 147 | An object of the form: |
| 148 | |
| 149 | { # A set of products. |
| 150 | "kind": "androidenterprise#productSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productSet". |
| 151 | "productId": [ # The list of product IDs making up the set of products. |
| 152 | "A String", |
| 153 | ], |
| 154 | }</pre> |
| 155 | </div> |
| 156 | |
| 157 | <div class="method"> |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 158 | <code class="details" id="list">list(enterpriseId, email)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 159 | <pre>Looks up a user by their primary email address. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 160 | |
| 161 | Args: |
| 162 | enterpriseId: string, The ID of the enterprise. (required) |
| 163 | email: string, The exact primary email address of the user to look up. (required) |
| 164 | |
| 165 | Returns: |
| 166 | An object of the form: |
| 167 | |
| 168 | { # The matching user resources. |
| 169 | "kind": "androidenterprise#usersListResponse", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#usersListResponse". |
| 170 | "user": [ # A user of an enterprise. |
| 171 | { # A user resource represents an individual user within the enterprise's domain. |
| 172 | # |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 173 | # Note that each user is associated with a Google account based on the user's corporate email address (which must be in one of the enterprise's domains). As part of installing the EMM's DPC app to manage a device the Google account must be provisioned to the device, and so the user resource must be created before that. This can be done using the Google Admin SDK Directory API. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 174 | # |
| 175 | # The ID for a user is an opaque string. It can be retrieved using the list method queried by the user's primary email address. |
| 176 | "kind": "androidenterprise#user", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user". |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 177 | "primaryEmail": "A String", # The user's primary email, e.g. "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 178 | "id": "A String", # The unique ID for the user. |
| 179 | }, |
| 180 | ], |
| 181 | }</pre> |
| 182 | </div> |
| 183 | |
| 184 | <div class="method"> |
| 185 | <code class="details" id="revokeToken">revokeToken(enterpriseId, userId)</code> |
| 186 | <pre>Revokes a previously generated token (activation code) for the user. |
| 187 | |
| 188 | Args: |
| 189 | enterpriseId: string, The ID of the enterprise. (required) |
| 190 | userId: string, The ID of the user. (required) |
| 191 | </pre> |
| 192 | </div> |
| 193 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 194 | <div class="method"> |
| 195 | <code class="details" id="setAvailableProductSet">setAvailableProductSet(enterpriseId, userId, body)</code> |
| 196 | <pre>Modifies the set of products a user is entitled to access. |
| 197 | |
| 198 | Args: |
| 199 | enterpriseId: string, The ID of the enterprise. (required) |
| 200 | userId: string, The ID of the user. (required) |
| 201 | body: object, The request body. (required) |
| 202 | The object takes the form of: |
| 203 | |
| 204 | { # A set of products. |
| 205 | "kind": "androidenterprise#productSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productSet". |
| 206 | "productId": [ # The list of product IDs making up the set of products. |
| 207 | "A String", |
| 208 | ], |
| 209 | } |
| 210 | |
| 211 | |
| 212 | Returns: |
| 213 | An object of the form: |
| 214 | |
| 215 | { # A set of products. |
| 216 | "kind": "androidenterprise#productSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productSet". |
| 217 | "productId": [ # The list of product IDs making up the set of products. |
| 218 | "A String", |
| 219 | ], |
| 220 | }</pre> |
| 221 | </div> |
| 222 | |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 223 | </body></html> |