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 "workDetailsUrl": "A String", # A link to the managed Google Play details page for the product, for use by an Enterprise admin. 158 "contentRating": "A String", # The content rating for this app. 159 "minAndroidSdkVersion": 42, # The minimum Android SDK necessary to run the app. 160 "category": "A String", # The app category (e.g. RACING, SOCIAL, etc.) 161 "title": "A String", # The name of the product. 162 "appVersion": [ # App versions currently available for this product. 163 { # This represents a single version of the app. 164 "track": "A String", # Deprecated, use trackId instead. 165 "trackId": [ # Track ids that the app version is published in. Replaces the track field (deprecated), but doesn't include the production track (see isProduction instead). 166 "A String", 167 ], 168 "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"). 169 "isProduction": True or False, # True if this version is a production APK. 170 "versionCode": 42, # Unique increasing identifier for the app version. 171 }, 172 ], 173 "appTracks": [ # The tracks visible to the enterprise. 174 { # Id to name association of a track. 175 "trackAlias": "A String", # A modifiable name for a track. This is the visible name in the play developer console. 176 "trackId": "A String", # Unmodifiable, unique track identifier. This identifier is the releaseTrackId in the url of the play developer console page that displays the track information. 177 }, 178 ], 179 "authorName": "A String", # The name of the author of the product (for example, the app developer). 180 "productId": "A String", # A string of the form app:<package name>. For example, app:com.google.android.gm represents the Gmail app. 181 "recentChanges": "A String", # A description of the recent changes made to the app. 182 "availableCountries": [ # The countries which this app is available in. 183 "A String", 184 ], 185 "description": "A String", # The localized promotional description, if available. 186 "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). 187 "screenshotUrls": [ # A list of screenshot links representing the app. 188 "A String", 189 ], 190 "detailsUrl": "A String", # A link to the (consumer) Google Play details page for the product. 191 "lastUpdatedTimestampMillis": "A String", # The approximate time (within 7 days) the app was last published, expressed in milliseconds since epoch. 192 "permissions": [ # A list of permissions required by the app. 193 { # 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. 194 # 195 # The API can be used to read the set of permissions, and also to update the set to indicate that permissions have been accepted. 196 "permissionId": "A String", # An opaque string uniquely identifying the permission. 197 "state": "A String", # Whether the permission has been accepted or not. 198 }, 199 ], 200 "kind": "androidenterprise#product", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#product". 201 "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. 202 "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. 203 "availableTracks": [ # Deprecated, use appTracks instead. 204 "A String", 205 ], 206 "signingCertificate": { # The certificate used to sign this product. 207 "certificateHashSha1": "A String", # The base64 urlsafe encoded SHA1 hash of the certificate. (This field is deprecated in favor of SHA2-256. It should not be used and may be removed at any time.) 208 "certificateHashSha256": "A String", # The base64 urlsafe encoded SHA2-256 hash of the certificate. 209 }, 210 "requiresContainerApp": True or False, # Deprecated. 211 }</pre> 212</div> 213 214<div class="method"> 215 <code class="details" id="getAppRestrictionsSchema">getAppRestrictionsSchema(enterpriseId, productId, language=None)</code> 216 <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. 217 218Args: 219 enterpriseId: string, The ID of the enterprise. (required) 220 productId: string, The ID of the product. (required) 221 language: string, The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). 222 223Returns: 224 An object of the form: 225 226 { # Represents the list of app restrictions available to be pre-configured for the product. 227 "restrictions": [ # The set of restrictions that make up this schema. 228 { # A restriction in the App Restriction Schema represents a piece of configuration that may be pre-applied. 229 "description": "A String", # A longer description of the restriction, giving more detail of what it affects. 230 "title": "A String", # The name of the restriction. 231 "defaultValue": { # A typed value for the restriction. # The default value of the restriction. bundle and bundleArray restrictions never have a default value. 232 "valueBool": True or False, # The boolean value - this will only be present if type is bool. 233 "valueString": "A String", # The string value - this will be present for types string, choice and hidden. 234 "type": "A String", # The type of the value being provided. 235 "valueMultiselect": [ # The list of string values - this will only be present if type is multiselect. 236 "A String", 237 ], 238 "valueInteger": 42, # The integer value - this will only be present if type is integer. 239 }, 240 "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. 241 # Object with schema name: AppRestrictionsSchemaRestriction 242 ], 243 "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. 244 "A String", 245 ], 246 "key": "A String", # The unique key that the product uses to identify the restriction, e.g. "com.google.android.gm.fieldname". 247 "entry": [ # For choice or multiselect restrictions, the list of possible entries' human-readable names. 248 "A String", 249 ], 250 "restrictionType": "A String", # The type of the restriction. 251 }, 252 ], 253 "kind": "androidenterprise#appRestrictionsSchema", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#appRestrictionsSchema". 254 }</pre> 255</div> 256 257<div class="method"> 258 <code class="details" id="getPermissions">getPermissions(enterpriseId, productId)</code> 259 <pre>Retrieves the Android app permissions required by this app. 260 261Args: 262 enterpriseId: string, The ID of the enterprise. (required) 263 productId: string, The ID of the product. (required) 264 265Returns: 266 An object of the form: 267 268 { # Information about the permissions required by a specific app and whether they have been accepted by the enterprise. 269 "kind": "androidenterprise#productPermissions", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productPermissions". 270 "productId": "A String", # The ID of the app that the permissions relate to, e.g. "app:com.google.android.gm". 271 "permission": [ # The permissions required by the app. 272 { # 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. 273 # 274 # The API can be used to read the set of permissions, and also to update the set to indicate that permissions have been accepted. 275 "permissionId": "A String", # An opaque string uniquely identifying the permission. 276 "state": "A String", # Whether the permission has been accepted or not. 277 }, 278 ], 279 }</pre> 280</div> 281 282<div class="method"> 283 <code class="details" id="list">list(enterpriseId, language=None, maxResults=None, token=None, query=None, approved=None)</code> 284 <pre>Finds approved products that match a query, or all approved products if there is no query. 285 286Args: 287 enterpriseId: string, The ID of the enterprise. (required) 288 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. 289 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. 290 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. 291 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). 292 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. 293 294Returns: 295 An object of the form: 296 297 { # The matching products. 298 "product": [ # Information about a product (e.g. an app) in the Google Play store, for display to an enterprise admin. 299 { # 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.) 300 # 301 # 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. 302 "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. 303 "workDetailsUrl": "A String", # A link to the managed Google Play details page for the product, for use by an Enterprise admin. 304 "contentRating": "A String", # The content rating for this app. 305 "minAndroidSdkVersion": 42, # The minimum Android SDK necessary to run the app. 306 "category": "A String", # The app category (e.g. RACING, SOCIAL, etc.) 307 "title": "A String", # The name of the product. 308 "appVersion": [ # App versions currently available for this product. 309 { # This represents a single version of the app. 310 "track": "A String", # Deprecated, use trackId instead. 311 "trackId": [ # Track ids that the app version is published in. Replaces the track field (deprecated), but doesn't include the production track (see isProduction instead). 312 "A String", 313 ], 314 "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"). 315 "isProduction": True or False, # True if this version is a production APK. 316 "versionCode": 42, # Unique increasing identifier for the app version. 317 }, 318 ], 319 "appTracks": [ # The tracks visible to the enterprise. 320 { # Id to name association of a track. 321 "trackAlias": "A String", # A modifiable name for a track. This is the visible name in the play developer console. 322 "trackId": "A String", # Unmodifiable, unique track identifier. This identifier is the releaseTrackId in the url of the play developer console page that displays the track information. 323 }, 324 ], 325 "authorName": "A String", # The name of the author of the product (for example, the app developer). 326 "productId": "A String", # A string of the form app:<package name>. For example, app:com.google.android.gm represents the Gmail app. 327 "recentChanges": "A String", # A description of the recent changes made to the app. 328 "availableCountries": [ # The countries which this app is available in. 329 "A String", 330 ], 331 "description": "A String", # The localized promotional description, if available. 332 "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). 333 "screenshotUrls": [ # A list of screenshot links representing the app. 334 "A String", 335 ], 336 "detailsUrl": "A String", # A link to the (consumer) Google Play details page for the product. 337 "lastUpdatedTimestampMillis": "A String", # The approximate time (within 7 days) the app was last published, expressed in milliseconds since epoch. 338 "permissions": [ # A list of permissions required by the app. 339 { # 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. 340 # 341 # The API can be used to read the set of permissions, and also to update the set to indicate that permissions have been accepted. 342 "permissionId": "A String", # An opaque string uniquely identifying the permission. 343 "state": "A String", # Whether the permission has been accepted or not. 344 }, 345 ], 346 "kind": "androidenterprise#product", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#product". 347 "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. 348 "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. 349 "availableTracks": [ # Deprecated, use appTracks instead. 350 "A String", 351 ], 352 "signingCertificate": { # The certificate used to sign this product. 353 "certificateHashSha1": "A String", # The base64 urlsafe encoded SHA1 hash of the certificate. (This field is deprecated in favor of SHA2-256. It should not be used and may be removed at any time.) 354 "certificateHashSha256": "A String", # The base64 urlsafe encoded SHA2-256 hash of the certificate. 355 }, 356 "requiresContainerApp": True or False, # Deprecated. 357 }, 358 ], 359 "kind": "androidenterprise#productsListResponse", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productsListResponse". 360 "tokenPagination": { # Pagination information for token pagination. 361 "nextPageToken": "A String", 362 "previousPageToken": "A String", 363 }, 364 "pageInfo": { # General pagination information. 365 "totalResults": 42, 366 "startIndex": 42, 367 "resultPerPage": 42, 368 }, 369 }</pre> 370</div> 371 372<div class="method"> 373 <code class="details" id="unapprove">unapprove(enterpriseId, productId)</code> 374 <pre>Unapproves the specified product (and the relevant app permissions, if any) 375 376Args: 377 enterpriseId: string, The ID of the enterprise. (required) 378 productId: string, The ID of the product. (required) 379</pre> 380</div> 381 382</body></html>