1<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 EMM API</a> . <a href="androidenterprise_v1.products.html">products</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#approve">approve(enterpriseId, productId, body)</a></code></p> 79<p class="firstline">Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000.</p> 80<p class="toc_element"> 81 <code><a href="#generateApprovalUrl">generateApprovalUrl(enterpriseId, productId, languageCode=None)</a></code></p> 82<p class="firstline">Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product.</p> 83<p class="toc_element"> 84 <code><a href="#get">get(enterpriseId, productId, language=None)</a></code></p> 85<p class="firstline">Retrieves details of a product for display to an enterprise admin.</p> 86<p class="toc_element"> 87 <code><a href="#getAppRestrictionsSchema">getAppRestrictionsSchema(enterpriseId, productId, language=None)</a></code></p> 88<p class="firstline">Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play.</p> 89<p class="toc_element"> 90 <code><a href="#getPermissions">getPermissions(enterpriseId, productId)</a></code></p> 91<p class="firstline">Retrieves the Android app permissions required by this app.</p> 92<p class="toc_element"> 93 <code><a href="#list">list(enterpriseId, language=None, maxResults=None, token=None, query=None, approved=None)</a></code></p> 94<p class="firstline">Finds approved products that match a query, or all approved products if there is no query.</p> 95<p class="toc_element"> 96 <code><a href="#unapprove">unapprove(enterpriseId, productId)</a></code></p> 97<p class="firstline">Unapproves the specified product (and the relevant app permissions, if any)</p> 98<h3>Method Details</h3> 99<div class="method"> 100 <code class="details" id="approve">approve(enterpriseId, productId, body)</code> 101 <pre>Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000. 102 103To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design. 104 105Args: 106 enterpriseId: string, The ID of the enterprise. (required) 107 productId: string, The ID of the product. (required) 108 body: object, The request body. (required) 109 The object takes the form of: 110 111{ 112 "approvedPermissions": "A String", # Sets how new permission requests for the product are handled. "allPermissions" automatically approves all current and future permissions for the product. "currentPermissionsOnly" approves the current set of permissions for the product, but any future permissions added through updates will require manual reapproval. If not specified, only the current set of permissions will be approved. 113 "approvalUrlInfo": { # Information on an approval URL. # The approval URL that was shown to the user. Only the permissions shown to the user with that URL will be accepted, which may not be the product's entire set of permissions. For example, the URL may only display new permissions from an update after the product was approved, or not include new permissions if the product was updated since the URL was generated. 114 "kind": "androidenterprise#approvalUrlInfo", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#approvalUrlInfo". 115 "approvalUrl": "A String", # A URL that displays a product's permissions and that can also be used to approve the product with the Products.approve call. 116 }, 117 } 118 119</pre> 120</div> 121 122<div class="method"> 123 <code class="details" id="generateApprovalUrl">generateApprovalUrl(enterpriseId, productId, languageCode=None)</code> 124 <pre>Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product. 125 126Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display permissions for up to 1 day. 127 128Args: 129 enterpriseId: string, The ID of the enterprise. (required) 130 productId: string, The ID of the product. (required) 131 languageCode: string, The BCP 47 language code used for permission names and descriptions in the returned iframe, for instance "en-US". 132 133Returns: 134 An object of the form: 135 136 { 137 "url": "A String", # A URL that can be rendered in an iframe to display the permissions (if any) of a product. This URL can be used to approve the product only once and only within 24 hours of being generated, using the Products.approve call. If the product is currently unapproved and has no permissions, this URL will point to an empty page. If the product is currently approved, a URL will only be generated if that product has added permissions since it was last approved, and the URL will only display those new permissions that have not yet been accepted. 138 }</pre> 139</div> 140 141<div class="method"> 142 <code class="details" id="get">get(enterpriseId, productId, language=None)</code> 143 <pre>Retrieves details of a product for display to an enterprise admin. 144 145Args: 146 enterpriseId: string, The ID of the enterprise. (required) 147 productId: string, The ID of the product, e.g. "app:com.google.android.gm". (required) 148 language: string, The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). 149 150Returns: 151 An object of the form: 152 153 { # A Products resource represents an app in the Google Play store that is available to at least some users in the enterprise. (Some apps are restricted to a single enterprise, and no information about them is made available outside that enterprise.) 154 # 155 # The information provided for each product (localized name, icon, link to the full Google Play details page) is intended to allow a basic representation of the product within an EMM user interface. 156 "smallIconUrl": "A String", # A link to a smaller image that can be used as an icon for the product. This image is suitable for use at up to 128px x 128px. 157 "kind": "androidenterprise#product", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#product". 158 "distributionChannel": "A String", # How and to whom the package is made available. The value publicGoogleHosted means that the package is available through the Play store and not restricted to a specific enterprise. The value privateGoogleHosted means that the package is a private app (restricted to an enterprise) but hosted by Google. The value privateSelfHosted means that the package is a private app (restricted to an enterprise) and is privately hosted. 159 "title": "A String", # The name of the product. 160 "workDetailsUrl": "A String", # A link to the managed Google Play details page for the product, for use by an Enterprise admin. 161 "appVersion": [ # App versions currently available for this product. The returned list contains only public versions. Alpha and beta versions are not included. 162 { # This represents a single version of the app. 163 "versionCode": 42, # Unique increasing identifier for the app version. 164 "versionString": "A String", # The string used in the Play store by the app developer to identify the version. The string is not necessarily unique or localized (for example, the string could be "1.4"). 165 }, 166 ], 167 "productPricing": "A String", # Whether this product is free, free with in-app purchases, or paid. If the pricing is unknown, this means the product is not generally available anymore (even though it might still be available to people who own it). 168 "iconUrl": "A String", # A link to an image that can be used as an icon for the product. This image is suitable for use at up to 512px x 512px. 169 "authorName": "A String", # The name of the author of the product (for example, the app developer). 170 "requiresContainerApp": True or False, # Deprecated. 171 "detailsUrl": "A String", # A link to the (consumer) Google Play details page for the product. 172 "productId": "A String", # A string of the form app:<package name>. For example, app:com.google.android.gm represents the Gmail app. 173 }</pre> 174</div> 175 176<div class="method"> 177 <code class="details" id="getAppRestrictionsSchema">getAppRestrictionsSchema(enterpriseId, productId, language=None)</code> 178 <pre>Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play. 179 180Args: 181 enterpriseId: string, The ID of the enterprise. (required) 182 productId: string, The ID of the product. (required) 183 language: string, The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). 184 185Returns: 186 An object of the form: 187 188 { # Represents the list of app restrictions available to be pre-configured for the product. 189 "restrictions": [ # The set of restrictions that make up this schema. 190 { # A restriction in the App Restriction Schema represents a piece of configuration that may be pre-applied. 191 "description": "A String", # A longer description of the restriction, giving more detail of what it affects. 192 "title": "A String", # The name of the restriction. 193 "defaultValue": { # A typed value for the restriction. # The default value of the restriction. bundle and bundleArray restrictions never have a default value. 194 "valueBool": True or False, # The boolean value - this will only be present if type is bool. 195 "valueString": "A String", # The string value - this will be present for types string, choice and hidden. 196 "type": "A String", # The type of the value being provided. 197 "valueMultiselect": [ # The list of string values - this will only be present if type is multiselect. 198 "A String", 199 ], 200 "valueInteger": 42, # The integer value - this will only be present if type is integer. 201 }, 202 "nestedRestriction": [ # For bundle or bundleArray restrictions, the list of nested restrictions. A bundle restriction is always nested within a bundleArray restriction, and a bundleArray restriction is at most two levels deep. 203 # Object with schema name: AppRestrictionsSchemaRestriction 204 ], 205 "entryValue": [ # For choice or multiselect restrictions, the list of possible entries' machine-readable values. These values should be used in the configuration, either as a single string value for a choice restriction or in a stringArray for a multiselect restriction. 206 "A String", 207 ], 208 "key": "A String", # The unique key that the product uses to identify the restriction, e.g. "com.google.android.gm.fieldname". 209 "entry": [ # For choice or multiselect restrictions, the list of possible entries' human-readable names. 210 "A String", 211 ], 212 "restrictionType": "A String", # The type of the restriction. 213 }, 214 ], 215 "kind": "androidenterprise#appRestrictionsSchema", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#appRestrictionsSchema". 216 }</pre> 217</div> 218 219<div class="method"> 220 <code class="details" id="getPermissions">getPermissions(enterpriseId, productId)</code> 221 <pre>Retrieves the Android app permissions required by this app. 222 223Args: 224 enterpriseId: string, The ID of the enterprise. (required) 225 productId: string, The ID of the product. (required) 226 227Returns: 228 An object of the form: 229 230 { # Information about the permissions required by a specific app and whether they have been accepted by the enterprise. 231 "kind": "androidenterprise#productPermissions", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productPermissions". 232 "productId": "A String", # The ID of the app that the permissions relate to, e.g. "app:com.google.android.gm". 233 "permission": [ # The permissions required by the app. 234 { # A product permissions resource represents the set of permissions required by a specific app and whether or not they have been accepted by an enterprise admin. 235 # 236 # The API can be used to read the set of permissions, and also to update the set to indicate that permissions have been accepted. 237 "permissionId": "A String", # An opaque string uniquely identifying the permission. 238 "state": "A String", # Whether the permission has been accepted or not. 239 }, 240 ], 241 }</pre> 242</div> 243 244<div class="method"> 245 <code class="details" id="list">list(enterpriseId, language=None, maxResults=None, token=None, query=None, approved=None)</code> 246 <pre>Finds approved products that match a query, or all approved products if there is no query. 247 248Args: 249 enterpriseId: string, The ID of the enterprise. (required) 250 language: string, The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). Results are returned in the language best matching the preferred language. 251 maxResults: integer, Specifies the maximum number of products that can be returned per request. If not specified, uses a default value of 100, which is also the maximum retrievable within a single response. 252 token: string, A pagination token is contained in a request''s response when there are more products. The token can be used in a subsequent request to obtain more products, and so forth. This parameter cannot be used in the initial request. 253 query: string, The search query as typed in the Google Play store search box. If omitted, all approved apps will be returned (using the pagination parameters), including apps that are not available in the store (e.g. unpublished apps). 254 approved: boolean, Specifies whether to search among all products (false) or among only products that have been approved (true). Only "true" is supported, and should be specified. 255 256Returns: 257 An object of the form: 258 259 { # The matching products. 260 "product": [ # Information about a product (e.g. an app) in the Google Play store, for display to an enterprise admin. 261 { # A Products resource represents an app in the Google Play store that is available to at least some users in the enterprise. (Some apps are restricted to a single enterprise, and no information about them is made available outside that enterprise.) 262 # 263 # The information provided for each product (localized name, icon, link to the full Google Play details page) is intended to allow a basic representation of the product within an EMM user interface. 264 "smallIconUrl": "A String", # A link to a smaller image that can be used as an icon for the product. This image is suitable for use at up to 128px x 128px. 265 "kind": "androidenterprise#product", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#product". 266 "distributionChannel": "A String", # How and to whom the package is made available. The value publicGoogleHosted means that the package is available through the Play store and not restricted to a specific enterprise. The value privateGoogleHosted means that the package is a private app (restricted to an enterprise) but hosted by Google. The value privateSelfHosted means that the package is a private app (restricted to an enterprise) and is privately hosted. 267 "title": "A String", # The name of the product. 268 "workDetailsUrl": "A String", # A link to the managed Google Play details page for the product, for use by an Enterprise admin. 269 "appVersion": [ # App versions currently available for this product. The returned list contains only public versions. Alpha and beta versions are not included. 270 { # This represents a single version of the app. 271 "versionCode": 42, # Unique increasing identifier for the app version. 272 "versionString": "A String", # The string used in the Play store by the app developer to identify the version. The string is not necessarily unique or localized (for example, the string could be "1.4"). 273 }, 274 ], 275 "productPricing": "A String", # Whether this product is free, free with in-app purchases, or paid. If the pricing is unknown, this means the product is not generally available anymore (even though it might still be available to people who own it). 276 "iconUrl": "A String", # A link to an image that can be used as an icon for the product. This image is suitable for use at up to 512px x 512px. 277 "authorName": "A String", # The name of the author of the product (for example, the app developer). 278 "requiresContainerApp": True or False, # Deprecated. 279 "detailsUrl": "A String", # A link to the (consumer) Google Play details page for the product. 280 "productId": "A String", # A string of the form app:<package name>. For example, app:com.google.android.gm represents the Gmail app. 281 }, 282 ], 283 "kind": "androidenterprise#productsListResponse", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productsListResponse". 284 "tokenPagination": { # Pagination information for token pagination. 285 "nextPageToken": "A String", 286 "previousPageToken": "A String", 287 }, 288 "pageInfo": { # General pagination information. 289 "totalResults": 42, 290 "startIndex": 42, 291 "resultPerPage": 42, 292 }, 293 }</pre> 294</div> 295 296<div class="method"> 297 <code class="details" id="unapprove">unapprove(enterpriseId, productId)</code> 298 <pre>Unapproves the specified product (and the relevant app permissions, if any) 299 300Args: 301 enterpriseId: string, The ID of the enterprise. (required) 302 productId: string, The ID of the product. (required) 303</pre> 304</div> 305 306</body></html>