blob: 645bf3c7baa7bb5acb13392f39a8ad723f07e747 [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
75<h1><a href="androidenterprise_v1.html">Google Play MDM API</a> . <a href="androidenterprise_v1.entitlements.html">entitlements</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(enterpriseId, userId, entitlementId)</a></code></p>
79<p class="firstline">Removes an entitlement to an app for a user and uninstalls it.</p>
80<p class="toc_element">
81 <code><a href="#get">get(enterpriseId, userId, entitlementId)</a></code></p>
82<p class="firstline">Retrieves details of an entitlement.</p>
83<p class="toc_element">
84 <code><a href="#list">list(enterpriseId, userId)</a></code></p>
85<p class="firstline">List of all entitlements for the specified user. Only the ID is set.</p>
86<p class="toc_element">
87 <code><a href="#patch">patch(enterpriseId, userId, entitlementId, body, install=None)</a></code></p>
88<p class="firstline">Adds or updates an entitlement to an app for a user. This method supports patch semantics.</p>
89<p class="toc_element">
90 <code><a href="#update">update(enterpriseId, userId, entitlementId, body, install=None)</a></code></p>
91<p class="firstline">Adds or updates an entitlement to an app for a user.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="delete">delete(enterpriseId, userId, entitlementId)</code>
95 <pre>Removes an entitlement to an app for a user and uninstalls it.
96
97Args:
98 enterpriseId: string, The ID of the enterprise. (required)
99 userId: string, The ID of the user. (required)
100 entitlementId: string, The ID of the entitlement, e.g. "app:com.google.android.gm". (required)
101</pre>
102</div>
103
104<div class="method">
105 <code class="details" id="get">get(enterpriseId, userId, entitlementId)</code>
106 <pre>Retrieves details of an entitlement.
107
108Args:
109 enterpriseId: string, The ID of the enterprise. (required)
110 userId: string, The ID of the user. (required)
111 entitlementId: string, The ID of the entitlement, e.g. "app:com.google.android.gm". (required)
112
113Returns:
114 An object of the form:
115
116 { # The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise.
117 #
118 # It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the MDM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails.
119 #
120 # Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices.
121 #
122 # The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted.
123 #
124 # Entitlements for paid apps that are due to purchases by the user on a non-managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API.
125 "kind": "androidenterprise#entitlement", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement".
126 "reason": "A String", # The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses.
127 "productId": "A String", # The ID of the product that the entitlement is for, e.g. "app:com.google.android.gm".
128 }</pre>
129</div>
130
131<div class="method">
132 <code class="details" id="list">list(enterpriseId, userId)</code>
133 <pre>List of all entitlements for the specified user. Only the ID is set.
134
135Args:
136 enterpriseId: string, The ID of the enterprise. (required)
137 userId: string, The ID of the user. (required)
138
139Returns:
140 An object of the form:
141
142 { # The entitlement resources for the user.
143 "kind": "androidenterprise#entitlementsListResponse", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlementsListResponse".
144 "entitlement": [ # An entitlement of a user to a product (e.g. an app). For example, a free app that they have installed, or a paid app that they have been allocated a license to.
145 { # The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise.
146 #
147 # It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the MDM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails.
148 #
149 # Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices.
150 #
151 # The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted.
152 #
153 # Entitlements for paid apps that are due to purchases by the user on a non-managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API.
154 "kind": "androidenterprise#entitlement", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement".
155 "reason": "A String", # The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses.
156 "productId": "A String", # The ID of the product that the entitlement is for, e.g. "app:com.google.android.gm".
157 },
158 ],
159 }</pre>
160</div>
161
162<div class="method">
163 <code class="details" id="patch">patch(enterpriseId, userId, entitlementId, body, install=None)</code>
164 <pre>Adds or updates an entitlement to an app for a user. This method supports patch semantics.
165
166Args:
167 enterpriseId: string, The ID of the enterprise. (required)
168 userId: string, The ID of the user. (required)
169 entitlementId: string, The ID of the entitlement, e.g. "app:com.google.android.gm". (required)
170 body: object, The request body. (required)
171 The object takes the form of:
172
173{ # The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise.
174 #
175 # It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the MDM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails.
176 #
177 # Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices.
178 #
179 # The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted.
180 #
181 # Entitlements for paid apps that are due to purchases by the user on a non-managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API.
182 "kind": "androidenterprise#entitlement", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement".
183 "reason": "A String", # The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses.
184 "productId": "A String", # The ID of the product that the entitlement is for, e.g. "app:com.google.android.gm".
185 }
186
187 install: boolean, Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user.
188
189Returns:
190 An object of the form:
191
192 { # The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise.
193 #
194 # It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the MDM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails.
195 #
196 # Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices.
197 #
198 # The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted.
199 #
200 # Entitlements for paid apps that are due to purchases by the user on a non-managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API.
201 "kind": "androidenterprise#entitlement", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement".
202 "reason": "A String", # The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses.
203 "productId": "A String", # The ID of the product that the entitlement is for, e.g. "app:com.google.android.gm".
204 }</pre>
205</div>
206
207<div class="method">
208 <code class="details" id="update">update(enterpriseId, userId, entitlementId, body, install=None)</code>
209 <pre>Adds or updates an entitlement to an app for a user.
210
211Args:
212 enterpriseId: string, The ID of the enterprise. (required)
213 userId: string, The ID of the user. (required)
214 entitlementId: string, The ID of the entitlement, e.g. "app:com.google.android.gm". (required)
215 body: object, The request body. (required)
216 The object takes the form of:
217
218{ # The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise.
219 #
220 # It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the MDM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails.
221 #
222 # Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices.
223 #
224 # The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted.
225 #
226 # Entitlements for paid apps that are due to purchases by the user on a non-managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API.
227 "kind": "androidenterprise#entitlement", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement".
228 "reason": "A String", # The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses.
229 "productId": "A String", # The ID of the product that the entitlement is for, e.g. "app:com.google.android.gm".
230 }
231
232 install: boolean, Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user.
233
234Returns:
235 An object of the form:
236
237 { # The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise.
238 #
239 # It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the MDM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails.
240 #
241 # Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices.
242 #
243 # The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted.
244 #
245 # Entitlements for paid apps that are due to purchases by the user on a non-managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API.
246 "kind": "androidenterprise#entitlement", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement".
247 "reason": "A String", # The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses.
248 "productId": "A String", # The ID of the product that the entitlement is for, e.g. "app:com.google.android.gm".
249 }</pre>
250</div>
251
252</body></html>