blob: 53b5c611537e70990db10161f84162fdb1985218 [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.enterprises.html">enterprises</a></h1>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000076<h2>Instance Methods</h2>
77<p class="toc_element">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070078 <code><a href="#acknowledgeNotificationSet">acknowledgeNotificationSet(notificationSetId=None)</a></code></p>
79<p class="firstline">Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications.</p>
80<p class="toc_element">
81 <code><a href="#completeSignup">completeSignup(completionToken=None, enterpriseToken=None)</a></code></p>
82<p class="firstline">Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given Enterprise Token.</p>
83<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070084 <code><a href="#createWebToken">createWebToken(enterpriseId, body)</a></code></p>
85<p class="firstline">Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the Play for Work javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information.</p>
86<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000087 <code><a href="#delete">delete(enterpriseId)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080088<p class="firstline">Deletes the binding between the EMM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call.</p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000089<p class="toc_element">
90 <code><a href="#enroll">enroll(token, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080091<p class="firstline">Enrolls an enterprise with the calling EMM.</p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000092<p class="toc_element">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070093 <code><a href="#generateSignupUrl">generateSignupUrl(callbackUrl=None)</a></code></p>
94<p class="firstline">Generates a sign-up URL.</p>
95<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000096 <code><a href="#get">get(enterpriseId)</a></code></p>
97<p class="firstline">Retrieves the name and domain of an enterprise.</p>
98<p class="toc_element">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070099 <code><a href="#getServiceAccount">getServiceAccount(enterpriseId, keyType=None)</a></code></p>
100<p class="firstline">Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side.</p>
101<p class="toc_element">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800102 <code><a href="#getStoreLayout">getStoreLayout(enterpriseId)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700103<p class="firstline">Returns the store layout for the enterprise. If the store layout has not been set, or if the store layout has no homepageId set, returns a NOT_FOUND error.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800104<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000105 <code><a href="#insert">insert(token, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800106<p class="firstline">Establishes the binding between the EMM and an enterprise. This is now deprecated; use enroll instead.</p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000107<p class="toc_element">
108 <code><a href="#list">list(domain)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700109<p class="firstline">Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the Enterprises.generateSignupUrl call.</p>
110<p class="toc_element">
111 <code><a href="#pullNotificationSet">pullNotificationSet(requestMode=None)</a></code></p>
112<p class="firstline">Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending.</p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000113<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -0700114 <code><a href="#sendTestPushNotification">sendTestPushNotification(enterpriseId)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800115<p class="firstline">Sends a test push notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700116<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000117 <code><a href="#setAccount">setAccount(enterpriseId, body)</a></code></p>
118<p class="firstline">Set the account that will be used to authenticate to the API as the enterprise.</p>
119<p class="toc_element">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800120 <code><a href="#setStoreLayout">setStoreLayout(enterpriseId, body)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700121<p class="firstline">Sets the store layout for the enterprise.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800122<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000123 <code><a href="#unenroll">unenroll(enterpriseId)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800124<p class="firstline">Unenrolls an enterprise from the calling EMM.</p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000125<h3>Method Details</h3>
126<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700127 <code class="details" id="acknowledgeNotificationSet">acknowledgeNotificationSet(notificationSetId=None)</code>
128 <pre>Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications.
129
130Args:
131 notificationSetId: string, The notification set ID as returned by Enterprises.PullNotificationSet. This must be provided.
132</pre>
133</div>
134
135<div class="method">
136 <code class="details" id="completeSignup">completeSignup(completionToken=None, enterpriseToken=None)</code>
137 <pre>Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given Enterprise Token.
138
139Args:
140 completionToken: string, The Completion token initially returned by GenerateSignupUrl.
141 enterpriseToken: string, The Enterprise token appended to the Callback URL.
142
143Returns:
144 An object of the form:
145
146 { # An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows:
147 # - For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process.
148 # - For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.
149 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
150 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
151 "email": "A String", # The administrator's email address.
152 },
153 ],
154 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
155 "id": "A String", # The unique ID for the enterprise.
156 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
157 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
158 }</pre>
159</div>
160
161<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700162 <code class="details" id="createWebToken">createWebToken(enterpriseId, body)</code>
163 <pre>Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the Play for Work javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information.
164
165Args:
166 enterpriseId: string, The ID of the enterprise. (required)
167 body: object, The request body. (required)
168 The object takes the form of:
169
170{ # Specification for a token used to generate iframes. The token specifies what data the admin is allowed to modify and the URI the iframe is allowed to communiate with.
171 "kind": "androidenterprise#administratorWebTokenSpec", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#administratorWebTokenSpec".
172 "parent": "A String", # The URI of the parent frame hosting the iframe. To prevent XSS, the iframe may not be hosted at other URIs. This URI must be https.
173 "permission": [ # The list of permissions the admin is granted within the iframe. The admin will only be allowed to view an iframe if they have all of the permissions associated with it.
174 "A String",
175 ],
176 }
177
178
179Returns:
180 An object of the form:
181
182 { # A token authorizing an administrator to access an iframe.
183 "kind": "androidenterprise#administratorWebToken", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#administratorWebToken".
184 "token": "A String", # An opaque token to be passed to the Play front-end to generate an iframe.
185 }</pre>
186</div>
187
188<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000189 <code class="details" id="delete">delete(enterpriseId)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800190 <pre>Deletes the binding between the EMM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000191
192Args:
193 enterpriseId: string, The ID of the enterprise. (required)
194</pre>
195</div>
196
197<div class="method">
198 <code class="details" id="enroll">enroll(token, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800199 <pre>Enrolls an enterprise with the calling EMM.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000200
201Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800202 token: string, The token provided by the enterprise to register the EMM. (required)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000203 body: object, The request body. (required)
204 The object takes the form of:
205
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700206{ # An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows:
207 # - For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process.
208 # - For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.
209 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
210 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
211 "email": "A String", # The administrator's email address.
212 },
213 ],
214 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000215 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700216 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
217 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000218 }
219
220
221Returns:
222 An object of the form:
223
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700224 { # An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows:
225 # - For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process.
226 # - For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.
227 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
228 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
229 "email": "A String", # The administrator's email address.
230 },
231 ],
232 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000233 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700234 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
235 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000236 }</pre>
237</div>
238
239<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700240 <code class="details" id="generateSignupUrl">generateSignupUrl(callbackUrl=None)</code>
241 <pre>Generates a sign-up URL.
242
243Args:
244 callbackUrl: string, The callback URL to which the Admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a single query parameter to this URL named "enterpriseToken" which will contain an opaque token to be used for the CompleteSignup request.
245Beware that this means that the URL will be parsed, the parameter added and then a new URL formatted, i.e. there may be some minor formatting changes and, more importantly, the URL must be well-formed so that it can be parsed.
246
247Returns:
248 An object of the form:
249
250 { # A resource returned by the GenerateSignupUrl API, which contains the Signup URL and Completion Token.
251 "url": "A String", # A URL under which the Admin can sign up for an enterprise. The page pointed to cannot be rendered in an iframe.
252 "kind": "androidenterprise#signupInfo", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#signupInfo".
253 "completionToken": "A String", # An opaque token that will be required, along with the Enterprise Token, for obtaining the enterprise resource from CompleteSignup.
254 }</pre>
255</div>
256
257<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000258 <code class="details" id="get">get(enterpriseId)</code>
259 <pre>Retrieves the name and domain of an enterprise.
260
261Args:
262 enterpriseId: string, The ID of the enterprise. (required)
263
264Returns:
265 An object of the form:
266
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700267 { # An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows:
268 # - For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process.
269 # - For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.
270 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
271 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
272 "email": "A String", # The administrator's email address.
273 },
274 ],
275 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000276 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700277 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
278 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000279 }</pre>
280</div>
281
282<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700283 <code class="details" id="getServiceAccount">getServiceAccount(enterpriseId, keyType=None)</code>
284 <pre>Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side.
285
286This method can only be called after calling Enterprises.Enroll or Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other times it will return an error.
287
288Subsequent calls after the first will generate a new, unique set of credentials, and invalidate the previously generated credentials.
289
290Once the service account is bound to the enterprise, it can be managed using the serviceAccountKeys resource.
291
292Args:
293 enterpriseId: string, The ID of the enterprise. (required)
294 keyType: string, The type of credential to return with the service account. Required.
295 Allowed values
296 googleCredentials -
297 pkcs12 -
298
299Returns:
300 An object of the form:
301
302 { # A service account identity, including the name and credentials that can be used to authenticate as the service account.
303 "kind": "androidenterprise#serviceAccount", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccount".
304 "name": "A String", # The account name of the service account, in the form of an email address. Assigned by the server.
305 "key": { # Credentials that can be used to authenticate as a service account. # Credentials that can be used to authenticate as this ServiceAccount.
306 "type": "A String", # The file format of the generated key data.
307 "kind": "androidenterprise#serviceAccountKey", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccountKey".
308 "data": "A String", # The body of the private key credentials file, in string format. This is only populated when the ServiceAccountKey is created, and is not stored by Google.
309 "id": "A String", # An opaque, unique identifier for this ServiceAccountKey. Assigned by the server.
310 },
311 }</pre>
312</div>
313
314<div class="method">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800315 <code class="details" id="getStoreLayout">getStoreLayout(enterpriseId)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700316 <pre>Returns the store layout for the enterprise. If the store layout has not been set, or if the store layout has no homepageId set, returns a NOT_FOUND error.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000317
318Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800319 enterpriseId: string, The ID of the enterprise. (required)
320
321Returns:
322 An object of the form:
323
324 { # General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened.
325 "homepageId": "A String", # The ID of the store page to be used as the homepage. The homepage will be used as the first page shown in the Google Play for Work store.
326 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700327 # If a homepage has not been set, the Play store shown on devices will be empty. Not specifying a homepage on a store layout effectively empties the store.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800328 #
329 # If there exists at least one page, this field must be set to the ID of a valid page.
330 "kind": "androidenterprise#storeLayout", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayout".
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700331 "storeLayoutType": "A String", # Sets a store layout type. If set to "custom", "homepageId" must be specified. If set to "basic", the layout will consist of all approved apps accessible by the user, split in pages of 100 each; in this case, "homepageId" must not be specified. The "basic" setting takes precedence over any existing collections setup for this enterprise (if any). Should the enterprise use collectionViewers for controlling access rights, these will still be respected.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800332 }</pre>
333</div>
334
335<div class="method">
336 <code class="details" id="insert">insert(token, body)</code>
337 <pre>Establishes the binding between the EMM and an enterprise. This is now deprecated; use enroll instead.
338
339Args:
340 token: string, The token provided by the enterprise to register the EMM. (required)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000341 body: object, The request body. (required)
342 The object takes the form of:
343
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700344{ # An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows:
345 # - For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process.
346 # - For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.
347 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
348 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
349 "email": "A String", # The administrator's email address.
350 },
351 ],
352 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000353 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700354 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
355 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000356 }
357
358
359Returns:
360 An object of the form:
361
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700362 { # An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows:
363 # - For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process.
364 # - For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.
365 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
366 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
367 "email": "A String", # The administrator's email address.
368 },
369 ],
370 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000371 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700372 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
373 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000374 }</pre>
375</div>
376
377<div class="method">
378 <code class="details" id="list">list(domain)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700379 <pre>Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the Enterprises.generateSignupUrl call.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000380
381Args:
382 domain: string, The exact primary domain name of the enterprise to look up. (required)
383
384Returns:
385 An object of the form:
386
387 { # The matching enterprise resources.
388 "kind": "androidenterprise#enterprisesListResponse", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprisesListResponse".
389 "enterprise": [ # An enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700390 { # An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows:
391 # - For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process.
392 # - For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.
393 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
394 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
395 "email": "A String", # The administrator's email address.
396 },
397 ],
398 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000399 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700400 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
401 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000402 },
403 ],
404 }</pre>
405</div>
406
407<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700408 <code class="details" id="pullNotificationSet">pullNotificationSet(requestMode=None)</code>
409 <pre>Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700410A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises​.AcknowledgeNotificationSet, unless the notification set is empty.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700411Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy.
412Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700413If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700414
415Args:
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700416 requestMode: string, The request mode for pulling notifications.
417Specifying waitForNotifications will cause the request to block and wait until one or more notifications are present, or return an empty notification list if no notifications are present after some time.
418Speciying returnImmediately will cause the request to immediately return the pending notifications, or an empty list if no notifications are present.
419If omitted, defaults to waitForNotifications.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700420 Allowed values
421 returnImmediately -
422 waitForNotifications -
423
424Returns:
425 An object of the form:
426
427 { # A resource returned by the PullNotificationSet API, which contains a collection of notifications for enterprises associated with the service account authenticated for the request.
428 "notification": [ # The notifications received, or empty if no notifications are present.
429 { # A notification of one event relating to an enterprise.
430 "appRestrictionsSchemaChangeEvent": { # An event generated when a new app version is uploaded to Google Play and its app restrictions schema changed. To fetch the app restrictions schema for an app, use Products.getAppRestrictionsSchema on the EMM API. # Notifications about new app restrictions schema changes.
431 "productId": "A String", # The id of the product (e.g. "app:com.google.android.gm") for which the app restriction schema changed. This field will always be present.
432 },
433 "newPermissionsEvent": { # An event generated when new permissions are added to an app. # Notifications about new app permissions.
434 "approvedPermissions": [ # The set of permissions that the enterprise admin has already approved for this application. Use Permissions.Get on the EMM API to retrieve details about these permissions.
435 "A String",
436 ],
437 "requestedPermissions": [ # The set of permissions that the app is currently requesting. Use Permissions.Get on the EMM API to retrieve details about these permissions.
438 "A String",
439 ],
440 "productId": "A String", # The id of the product (e.g. "app:com.google.android.gm") for which new permissions were added. This field will always be present.
441 },
442 "productAvailabilityChangeEvent": { # An event generated whenever a product's availability changes. # Notifications about product availability changes.
443 "availabilityStatus": "A String", # The new state of the product. This field will always be present.
444 "productId": "A String", # The id of the product (e.g. "app:com.google.android.gm") for which the product availability changed. This field will always be present.
445 },
446 "productApprovalEvent": { # An event generated when a product's approval status is changed. # Notifications about changes to a product's approval status.
447 "approved": "A String", # Whether the product was approved or unapproved. This field will always be present.
448 "productId": "A String", # The id of the product (e.g. "app:com.google.android.gm") for which the approval status has changed. This field will always be present.
449 },
450 "enterpriseId": "A String", # The ID of the enterprise for which the notification is sent. This will always be present.
451 "installFailureEvent": { # An event generated when an app installation failed on a device # Notifications about an app installation failure.
452 "productId": "A String", # The id of the product (e.g. "app:com.google.android.gm") for which the install failure event occured. This field will always be present.
453 "userId": "A String", # The ID of the user. This field will always be present.
454 "deviceId": "A String", # The Android ID of the device. This field will always be present.
455 "failureDetails": "A String", # Additional details on the failure if applicable.
456 "failureReason": "A String", # The reason for the installation failure. This field will always be present.
457 },
458 "appUpdateEvent": { # An event generated when a new version of an app is uploaded to Google Play. Notifications are sent for new public versions only: alpha, beta, or canary versions do not generate this event. To fetch up-to-date version history for an app, use Products.Get on the EMM API. # Notifications about app updates.
459 "productId": "A String", # The id of the product (e.g. "app:com.google.android.gm") that was updated. This field will always be present.
460 },
461 "timestampMillis": "A String", # The time when the notification was published in milliseconds since 1970-01-01T00:00:00Z. This will always be present.
462 },
463 ],
464 "kind": "androidenterprise#notificationSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#notificationSet".
465 "notificationSetId": "A String", # The notification set ID, required to mark the notification as received with the Enterprises.AcknowledgeNotification API. This will be omitted if no notifications are present.
466 }</pre>
467</div>
468
469<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700470 <code class="details" id="sendTestPushNotification">sendTestPushNotification(enterpriseId)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800471 <pre>Sends a test push notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise.
Takashi Matsuo06694102015-09-11 13:55:40 -0700472
473Args:
474 enterpriseId: string, The ID of the enterprise. (required)
475
476Returns:
477 An object of the form:
478
479 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800480 "topicName": "A String", # The name of the Cloud Pub/Sub topic to which notifications for this enterprise's enrolled account will be sent.
Takashi Matsuo06694102015-09-11 13:55:40 -0700481 "messageId": "A String", # The message ID of the test push notification that was sent.
482 }</pre>
483</div>
484
485<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000486 <code class="details" id="setAccount">setAccount(enterpriseId, body)</code>
487 <pre>Set the account that will be used to authenticate to the API as the enterprise.
488
489Args:
490 enterpriseId: string, The ID of the enterprise. (required)
491 body: object, The request body. (required)
492 The object takes the form of:
493
494{ # A service account that can be used to authenticate as the enterprise to API calls that require such authentication.
495 "kind": "androidenterprise#enterpriseAccount", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterpriseAccount".
496 "accountEmail": "A String", # The email address of the service account.
497 }
498
499
500Returns:
501 An object of the form:
502
503 { # A service account that can be used to authenticate as the enterprise to API calls that require such authentication.
504 "kind": "androidenterprise#enterpriseAccount", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterpriseAccount".
505 "accountEmail": "A String", # The email address of the service account.
506 }</pre>
507</div>
508
509<div class="method">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800510 <code class="details" id="setStoreLayout">setStoreLayout(enterpriseId, body)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700511 <pre>Sets the store layout for the enterprise.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800512
513Args:
514 enterpriseId: string, The ID of the enterprise. (required)
515 body: object, The request body. (required)
516 The object takes the form of:
517
518{ # General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened.
519 "homepageId": "A String", # The ID of the store page to be used as the homepage. The homepage will be used as the first page shown in the Google Play for Work store.
520 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700521 # If a homepage has not been set, the Play store shown on devices will be empty. Not specifying a homepage on a store layout effectively empties the store.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800522 #
523 # If there exists at least one page, this field must be set to the ID of a valid page.
524 "kind": "androidenterprise#storeLayout", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayout".
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700525 "storeLayoutType": "A String", # Sets a store layout type. If set to "custom", "homepageId" must be specified. If set to "basic", the layout will consist of all approved apps accessible by the user, split in pages of 100 each; in this case, "homepageId" must not be specified. The "basic" setting takes precedence over any existing collections setup for this enterprise (if any). Should the enterprise use collectionViewers for controlling access rights, these will still be respected.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800526}
527
528
529Returns:
530 An object of the form:
531
532 { # General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened.
533 "homepageId": "A String", # The ID of the store page to be used as the homepage. The homepage will be used as the first page shown in the Google Play for Work store.
534 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700535 # If a homepage has not been set, the Play store shown on devices will be empty. Not specifying a homepage on a store layout effectively empties the store.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800536 #
537 # If there exists at least one page, this field must be set to the ID of a valid page.
538 "kind": "androidenterprise#storeLayout", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayout".
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700539 "storeLayoutType": "A String", # Sets a store layout type. If set to "custom", "homepageId" must be specified. If set to "basic", the layout will consist of all approved apps accessible by the user, split in pages of 100 each; in this case, "homepageId" must not be specified. The "basic" setting takes precedence over any existing collections setup for this enterprise (if any). Should the enterprise use collectionViewers for controlling access rights, these will still be respected.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800540 }</pre>
541</div>
542
543<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000544 <code class="details" id="unenroll">unenroll(enterpriseId)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800545 <pre>Unenrolls an enterprise from the calling EMM.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000546
547Args:
548 enterpriseId: string, The ID of the enterprise. (required)
549</pre>
550</div>
551
552</body></html>