blob: 6961ee8cf1adf71f606ea8b097bd905d4fea8386 [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">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000084 <code><a href="#delete">delete(enterpriseId)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080085<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 +000086<p class="toc_element">
87 <code><a href="#enroll">enroll(token, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080088<p class="firstline">Enrolls an enterprise with the calling EMM.</p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000089<p class="toc_element">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070090 <code><a href="#generateSignupUrl">generateSignupUrl(callbackUrl=None)</a></code></p>
91<p class="firstline">Generates a sign-up URL.</p>
92<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000093 <code><a href="#get">get(enterpriseId)</a></code></p>
94<p class="firstline">Retrieves the name and domain of an enterprise.</p>
95<p class="toc_element">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070096 <code><a href="#getServiceAccount">getServiceAccount(enterpriseId, keyType=None)</a></code></p>
97<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>
98<p class="toc_element">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080099 <code><a href="#getStoreLayout">getStoreLayout(enterpriseId)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700100<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 -0800101<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000102 <code><a href="#insert">insert(token, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<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 +0000104<p class="toc_element">
105 <code><a href="#list">list(domain)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700106<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>
107<p class="toc_element">
108 <code><a href="#pullNotificationSet">pullNotificationSet(requestMode=None)</a></code></p>
109<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 +0000110<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -0700111 <code><a href="#sendTestPushNotification">sendTestPushNotification(enterpriseId)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800112<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 -0700113<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000114 <code><a href="#setAccount">setAccount(enterpriseId, body)</a></code></p>
115<p class="firstline">Set the account that will be used to authenticate to the API as the enterprise.</p>
116<p class="toc_element">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800117 <code><a href="#setStoreLayout">setStoreLayout(enterpriseId, body)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700118<p class="firstline">Sets the store layout for the enterprise.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800119<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000120 <code><a href="#unenroll">unenroll(enterpriseId)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800121<p class="firstline">Unenrolls an enterprise from the calling EMM.</p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000122<h3>Method Details</h3>
123<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700124 <code class="details" id="acknowledgeNotificationSet">acknowledgeNotificationSet(notificationSetId=None)</code>
125 <pre>Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications.
126
127Args:
128 notificationSetId: string, The notification set ID as returned by Enterprises.PullNotificationSet. This must be provided.
129</pre>
130</div>
131
132<div class="method">
133 <code class="details" id="completeSignup">completeSignup(completionToken=None, enterpriseToken=None)</code>
134 <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.
135
136Args:
137 completionToken: string, The Completion token initially returned by GenerateSignupUrl.
138 enterpriseToken: string, The Enterprise token appended to the Callback URL.
139
140Returns:
141 An object of the form:
142
143 { # 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:
144 # - 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.
145 # - 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.
146 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
147 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
148 "email": "A String", # The administrator's email address.
149 },
150 ],
151 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
152 "id": "A String", # The unique ID for the enterprise.
153 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
154 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
155 }</pre>
156</div>
157
158<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000159 <code class="details" id="delete">delete(enterpriseId)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800160 <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 +0000161
162Args:
163 enterpriseId: string, The ID of the enterprise. (required)
164</pre>
165</div>
166
167<div class="method">
168 <code class="details" id="enroll">enroll(token, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800169 <pre>Enrolls an enterprise with the calling EMM.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000170
171Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800172 token: string, The token provided by the enterprise to register the EMM. (required)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000173 body: object, The request body. (required)
174 The object takes the form of:
175
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700176{ # 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:
177 # - 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.
178 # - 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.
179 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
180 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
181 "email": "A String", # The administrator's email address.
182 },
183 ],
184 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000185 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700186 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
187 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000188 }
189
190
191Returns:
192 An object of the form:
193
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700194 { # 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:
195 # - 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.
196 # - 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.
197 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
198 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
199 "email": "A String", # The administrator's email address.
200 },
201 ],
202 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000203 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700204 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
205 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000206 }</pre>
207</div>
208
209<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700210 <code class="details" id="generateSignupUrl">generateSignupUrl(callbackUrl=None)</code>
211 <pre>Generates a sign-up URL.
212
213Args:
214 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.
215Beware 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.
216
217Returns:
218 An object of the form:
219
220 { # A resource returned by the GenerateSignupUrl API, which contains the Signup URL and Completion Token.
221 "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.
222 "kind": "androidenterprise#signupInfo", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#signupInfo".
223 "completionToken": "A String", # An opaque token that will be required, along with the Enterprise Token, for obtaining the enterprise resource from CompleteSignup.
224 }</pre>
225</div>
226
227<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000228 <code class="details" id="get">get(enterpriseId)</code>
229 <pre>Retrieves the name and domain of an enterprise.
230
231Args:
232 enterpriseId: string, The ID of the enterprise. (required)
233
234Returns:
235 An object of the form:
236
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700237 { # 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:
238 # - 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.
239 # - 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.
240 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
241 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
242 "email": "A String", # The administrator's email address.
243 },
244 ],
245 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000246 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700247 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
248 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000249 }</pre>
250</div>
251
252<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700253 <code class="details" id="getServiceAccount">getServiceAccount(enterpriseId, keyType=None)</code>
254 <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.
255
256This method can only be called after calling Enterprises.Enroll or Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other times it will return an error.
257
258Subsequent calls after the first will generate a new, unique set of credentials, and invalidate the previously generated credentials.
259
260Once the service account is bound to the enterprise, it can be managed using the serviceAccountKeys resource.
261
262Args:
263 enterpriseId: string, The ID of the enterprise. (required)
264 keyType: string, The type of credential to return with the service account. Required.
265 Allowed values
266 googleCredentials -
267 pkcs12 -
268
269Returns:
270 An object of the form:
271
272 { # A service account identity, including the name and credentials that can be used to authenticate as the service account.
273 "kind": "androidenterprise#serviceAccount", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccount".
274 "name": "A String", # The account name of the service account, in the form of an email address. Assigned by the server.
275 "key": { # Credentials that can be used to authenticate as a service account. # Credentials that can be used to authenticate as this ServiceAccount.
276 "type": "A String", # The file format of the generated key data.
277 "kind": "androidenterprise#serviceAccountKey", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccountKey".
278 "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.
279 "id": "A String", # An opaque, unique identifier for this ServiceAccountKey. Assigned by the server.
280 },
281 }</pre>
282</div>
283
284<div class="method">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800285 <code class="details" id="getStoreLayout">getStoreLayout(enterpriseId)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700286 <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 +0000287
288Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800289 enterpriseId: string, The ID of the enterprise. (required)
290
291Returns:
292 An object of the form:
293
294 { # General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened.
295 "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.
296 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700297 # 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 -0800298 #
299 # If there exists at least one page, this field must be set to the ID of a valid page.
300 "kind": "androidenterprise#storeLayout", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayout".
301 }</pre>
302</div>
303
304<div class="method">
305 <code class="details" id="insert">insert(token, body)</code>
306 <pre>Establishes the binding between the EMM and an enterprise. This is now deprecated; use enroll instead.
307
308Args:
309 token: string, The token provided by the enterprise to register the EMM. (required)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000310 body: object, The request body. (required)
311 The object takes the form of:
312
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700313{ # 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:
314 # - 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.
315 # - 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.
316 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
317 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
318 "email": "A String", # The administrator's email address.
319 },
320 ],
321 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000322 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700323 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
324 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000325 }
326
327
328Returns:
329 An object of the form:
330
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700331 { # 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:
332 # - 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.
333 # - 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.
334 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
335 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
336 "email": "A String", # The administrator's email address.
337 },
338 ],
339 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000340 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700341 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
342 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000343 }</pre>
344</div>
345
346<div class="method">
347 <code class="details" id="list">list(domain)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700348 <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 +0000349
350Args:
351 domain: string, The exact primary domain name of the enterprise to look up. (required)
352
353Returns:
354 An object of the form:
355
356 { # The matching enterprise resources.
357 "kind": "androidenterprise#enterprisesListResponse", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprisesListResponse".
358 "enterprise": [ # An enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700359 { # 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:
360 # - 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.
361 # - 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.
362 "administrator": [ # Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.
363 { # This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.
364 "email": "A String", # The administrator's email address.
365 },
366 ],
367 "primaryDomain": "A String", # The enterprise's primary domain, such as "example.com".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000368 "id": "A String", # The unique ID for the enterprise.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700369 "kind": "androidenterprise#enterprise", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise".
370 "name": "A String", # The name of the enterprise, for example, "Example, Inc".
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000371 },
372 ],
373 }</pre>
374</div>
375
376<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700377 <code class="details" id="pullNotificationSet">pullNotificationSet(requestMode=None)</code>
378 <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.
379A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set is empty.
380Notifications 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.
381Multiple 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.
382
383Args:
384 requestMode: string, The request mode for pulling notifications. If omitted, defaults to WAIT_FOR_NOTIFCATIONS.
385If this is set to WAIT_FOR_NOTIFCATIONS, the request will eventually timeout, in which case it should be retried.
386 Allowed values
387 returnImmediately -
388 waitForNotifications -
389
390Returns:
391 An object of the form:
392
393 { # A resource returned by the PullNotificationSet API, which contains a collection of notifications for enterprises associated with the service account authenticated for the request.
394 "notification": [ # The notifications received, or empty if no notifications are present.
395 { # A notification of one event relating to an enterprise.
396 "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.
397 "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.
398 },
399 "newPermissionsEvent": { # An event generated when new permissions are added to an app. # Notifications about new app permissions.
400 "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.
401 "A String",
402 ],
403 "requestedPermissions": [ # The set of permissions that the app is currently requesting. Use Permissions.Get on the EMM API to retrieve details about these permissions.
404 "A String",
405 ],
406 "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.
407 },
408 "productAvailabilityChangeEvent": { # An event generated whenever a product's availability changes. # Notifications about product availability changes.
409 "availabilityStatus": "A String", # The new state of the product. This field will always be present.
410 "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.
411 },
412 "productApprovalEvent": { # An event generated when a product's approval status is changed. # Notifications about changes to a product's approval status.
413 "approved": "A String", # Whether the product was approved or unapproved. This field will always be present.
414 "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.
415 },
416 "enterpriseId": "A String", # The ID of the enterprise for which the notification is sent. This will always be present.
417 "installFailureEvent": { # An event generated when an app installation failed on a device # Notifications about an app installation failure.
418 "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.
419 "userId": "A String", # The ID of the user. This field will always be present.
420 "deviceId": "A String", # The Android ID of the device. This field will always be present.
421 "failureDetails": "A String", # Additional details on the failure if applicable.
422 "failureReason": "A String", # The reason for the installation failure. This field will always be present.
423 },
424 "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.
425 "productId": "A String", # The id of the product (e.g. "app:com.google.android.gm") that was updated. This field will always be present.
426 },
427 "timestampMillis": "A String", # The time when the notification was published in milliseconds since 1970-01-01T00:00:00Z. This will always be present.
428 },
429 ],
430 "kind": "androidenterprise#notificationSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#notificationSet".
431 "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.
432 }</pre>
433</div>
434
435<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700436 <code class="details" id="sendTestPushNotification">sendTestPushNotification(enterpriseId)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800437 <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 -0700438
439Args:
440 enterpriseId: string, The ID of the enterprise. (required)
441
442Returns:
443 An object of the form:
444
445 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800446 "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 -0700447 "messageId": "A String", # The message ID of the test push notification that was sent.
448 }</pre>
449</div>
450
451<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000452 <code class="details" id="setAccount">setAccount(enterpriseId, body)</code>
453 <pre>Set the account that will be used to authenticate to the API as the enterprise.
454
455Args:
456 enterpriseId: string, The ID of the enterprise. (required)
457 body: object, The request body. (required)
458 The object takes the form of:
459
460{ # A service account that can be used to authenticate as the enterprise to API calls that require such authentication.
461 "kind": "androidenterprise#enterpriseAccount", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterpriseAccount".
462 "accountEmail": "A String", # The email address of the service account.
463 }
464
465
466Returns:
467 An object of the form:
468
469 { # A service account that can be used to authenticate as the enterprise to API calls that require such authentication.
470 "kind": "androidenterprise#enterpriseAccount", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterpriseAccount".
471 "accountEmail": "A String", # The email address of the service account.
472 }</pre>
473</div>
474
475<div class="method">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800476 <code class="details" id="setStoreLayout">setStoreLayout(enterpriseId, body)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700477 <pre>Sets the store layout for the enterprise.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800478
479Args:
480 enterpriseId: string, The ID of the enterprise. (required)
481 body: object, The request body. (required)
482 The object takes the form of:
483
484{ # General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened.
485 "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.
486 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700487 # 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 -0800488 #
489 # If there exists at least one page, this field must be set to the ID of a valid page.
490 "kind": "androidenterprise#storeLayout", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayout".
491}
492
493
494Returns:
495 An object of the form:
496
497 { # General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened.
498 "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.
499 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700500 # 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 -0800501 #
502 # If there exists at least one page, this field must be set to the ID of a valid page.
503 "kind": "androidenterprise#storeLayout", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayout".
504 }</pre>
505</div>
506
507<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000508 <code class="details" id="unenroll">unenroll(enterpriseId)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800509 <pre>Unenrolls an enterprise from the calling EMM.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000510
511Args:
512 enterpriseId: string, The ID of the enterprise. (required)
513</pre>
514</div>
515
516</body></html>