blob: ed911d59cc26627d37c2d77ac7005ff7788cb7d5 [file] [log] [blame]
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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 Manista4f877e52015-06-15 16:44:50 +000075<h1><a href="androidenterprise_v1.html">Google Play EMM API</a> . <a href="androidenterprise_v1.users.html">users</a></h1>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000076<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 Matsuo06694102015-09-11 13:55:40 -070084 <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 Manista5cbe5ba2015-03-10 23:29:22 +000087 <code><a href="#list">list(enterpriseId, email)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080088<p class="firstline">Looks up a user by their primary email address.</p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000089<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 Matsuo06694102015-09-11 13:55:40 -070092<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 Manista5cbe5ba2015-03-10 23:29:22 +000095<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 Parrott36e41bc2016-02-19 16:02:29 -0800100This call only works with Google managed accounts.
101
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000102Args:
103 enterpriseId: string, The ID of the enterprise. (required)
104 userId: string, The ID of the user. (required)
105
106Returns:
107 An object of the form:
108
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109 { # 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 Manista5cbe5ba2015-03-10 23:29:22 +0000110 "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
120Args:
121 enterpriseId: string, The ID of the enterprise. (required)
122 userId: string, The ID of the user. (required)
123
124Returns:
125 An object of the form:
126
127 { # A user resource represents an individual user within the enterprise's domain.
128 #
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800129 # 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 Manista5cbe5ba2015-03-10 23:29:22 +0000130 #
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 Parrott36e41bc2016-02-19 16:02:29 -0800133 "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 Manista5cbe5ba2015-03-10 23:29:22 +0000134 "id": "A String", # The unique ID for the user.
135 }</pre>
136</div>
137
138<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700139 <code class="details" id="getAvailableProductSet">getAvailableProductSet(enterpriseId, userId)</code>
140 <pre>Retrieves the set of products a user is entitled to access.
141
142Args:
143 enterpriseId: string, The ID of the enterprise. (required)
144 userId: string, The ID of the user. (required)
145
146Returns:
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 Manista5cbe5ba2015-03-10 23:29:22 +0000158 <code class="details" id="list">list(enterpriseId, email)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800159 <pre>Looks up a user by their primary email address.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000160
161Args:
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
165Returns:
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 Parrott36e41bc2016-02-19 16:02:29 -0800173 # 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 Manista5cbe5ba2015-03-10 23:29:22 +0000174 #
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 Parrott36e41bc2016-02-19 16:02:29 -0800177 "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 Manista5cbe5ba2015-03-10 23:29:22 +0000178 "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
188Args:
189 enterpriseId: string, The ID of the enterprise. (required)
190 userId: string, The ID of the user. (required)
191</pre>
192</div>
193
Takashi Matsuo06694102015-09-11 13:55:40 -0700194<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
198Args:
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
212Returns:
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 Manista5cbe5ba2015-03-10 23:29:22 +0000223</body></html>