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=None, x__xgafv=None)</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. To 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. </p> 80<p class="toc_element"> 81 <code><a href="#close">close()</a></code></p> 82<p class="firstline">Close httplib2 connections.</p> 83<p class="toc_element"> 84 <code><a href="#generateApprovalUrl">generateApprovalUrl(enterpriseId, productId, languageCode=None, x__xgafv=None)</a></code></p> 85<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. Admins 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.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(enterpriseId, productId, language=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Retrieves details of a product for display to an enterprise admin.</p> 89<p class="toc_element"> 90 <code><a href="#getAppRestrictionsSchema">getAppRestrictionsSchema(enterpriseId, productId, language=None, x__xgafv=None)</a></code></p> 91<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> 92<p class="toc_element"> 93 <code><a href="#getPermissions">getPermissions(enterpriseId, productId, x__xgafv=None)</a></code></p> 94<p class="firstline">Retrieves the Android app permissions required by this app.</p> 95<p class="toc_element"> 96 <code><a href="#list">list(enterpriseId, approved=None, language=None, maxResults=None, query=None, token=None, x__xgafv=None)</a></code></p> 97<p class="firstline">Finds approved products that match a query, or all approved products if there is no query.</p> 98<p class="toc_element"> 99 <code><a href="#unapprove">unapprove(enterpriseId, productId, x__xgafv=None)</a></code></p> 100<p class="firstline">Unapproves the specified product (and the relevant app permissions, if any)</p> 101<h3>Method Details</h3> 102<div class="method"> 103 <code class="details" id="approve">approve(enterpriseId, productId, body=None, x__xgafv=None)</code> 104 <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. To 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. 105 106Args: 107 enterpriseId: string, The ID of the enterprise. (required) 108 productId: string, The ID of the product. (required) 109 body: object, The request body. 110 The object takes the form of: 111 112{ 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 "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. 115 }, 116 "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. 117} 118 119 x__xgafv: string, V1 error format. 120 Allowed values 121 1 - v1 error format 122 2 - v2 error format 123</pre> 124</div> 125 126<div class="method"> 127 <code class="details" id="close">close()</code> 128 <pre>Close httplib2 connections.</pre> 129</div> 130 131<div class="method"> 132 <code class="details" id="generateApprovalUrl">generateApprovalUrl(enterpriseId, productId, languageCode=None, x__xgafv=None)</code> 133 <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. Admins 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. 134 135Args: 136 enterpriseId: string, The ID of the enterprise. (required) 137 productId: string, The ID of the product. (required) 138 languageCode: string, The BCP 47 language code used for permission names and descriptions in the returned iframe, for instance "en-US". 139 x__xgafv: string, V1 error format. 140 Allowed values 141 1 - v1 error format 142 2 - v2 error format 143 144Returns: 145 An object of the form: 146 147 { 148 "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. 149}</pre> 150</div> 151 152<div class="method"> 153 <code class="details" id="get">get(enterpriseId, productId, language=None, x__xgafv=None)</code> 154 <pre>Retrieves details of a product for display to an enterprise admin. 155 156Args: 157 enterpriseId: string, The ID of the enterprise. (required) 158 productId: string, The ID of the product, e.g. "app:com.google.android.gm". (required) 159 language: string, The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). 160 x__xgafv: string, V1 error format. 161 Allowed values 162 1 - v1 error format 163 2 - v2 error format 164 165Returns: 166 An object of the form: 167 168 { # 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.) 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. 169 "appTracks": [ # The tracks visible to the enterprise. 170 { # Id to name association of a track. 171 "trackAlias": "A String", # A modifiable name for a track. This is the visible name in the play developer console. 172 "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. 173 }, 174 ], 175 "appVersion": [ # App versions currently available for this product. 176 { # This represents a single version of the app. 177 "isProduction": True or False, # True if this version is a production APK. 178 "track": "A String", # Deprecated, use trackId instead. 179 "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). 180 "A String", 181 ], 182 "versionCode": 42, # Unique increasing identifier for the app version. 183 "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"). 184 }, 185 ], 186 "authorName": "A String", # The name of the author of the product (for example, the app developer). 187 "availableCountries": [ # The countries which this app is available in. 188 "A String", 189 ], 190 "availableTracks": [ # Deprecated, use appTracks instead. 191 "A String", 192 ], 193 "category": "A String", # The app category (e.g. RACING, SOCIAL, etc.) 194 "contentRating": "A String", # The content rating for this app. 195 "description": "A String", # The localized promotional description, if available. 196 "detailsUrl": "A String", # A link to the (consumer) Google Play details page for the product. 197 "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. 198 "features": [ # Noteworthy features (if any) of this product. 199 "A String", 200 ], 201 "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. 202 "lastUpdatedTimestampMillis": "A String", # The approximate time (within 7 days) the app was last published, expressed in milliseconds since epoch. 203 "minAndroidSdkVersion": 42, # The minimum Android SDK necessary to run the app. 204 "permissions": [ # A list of permissions required by the app. 205 { # 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. The API can be used to read the set of permissions, and also to update the set to indicate that permissions have been accepted. 206 "permissionId": "A String", # An opaque string uniquely identifying the permission. 207 "state": "A String", # Whether the permission has been accepted or not. 208 }, 209 ], 210 "productId": "A String", # A string of the form *app:<package name>*. For example, app:com.google.android.gm represents the Gmail app. 211 "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). 212 "recentChanges": "A String", # A description of the recent changes made to the app. 213 "requiresContainerApp": True or False, # Deprecated. 214 "screenshotUrls": [ # A list of screenshot links representing the app. 215 "A String", 216 ], 217 "signingCertificate": { # The certificate used to sign this product. 218 "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.) 219 "certificateHashSha256": "A String", # The base64 urlsafe encoded SHA2-256 hash of the certificate. 220 }, 221 "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. 222 "title": "A String", # The name of the product. 223 "workDetailsUrl": "A String", # A link to the managed Google Play details page for the product, for use by an Enterprise admin. 224}</pre> 225</div> 226 227<div class="method"> 228 <code class="details" id="getAppRestrictionsSchema">getAppRestrictionsSchema(enterpriseId, productId, language=None, x__xgafv=None)</code> 229 <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. 230 231Args: 232 enterpriseId: string, The ID of the enterprise. (required) 233 productId: string, The ID of the product. (required) 234 language: string, The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). 235 x__xgafv: string, V1 error format. 236 Allowed values 237 1 - v1 error format 238 2 - v2 error format 239 240Returns: 241 An object of the form: 242 243 { # Represents the list of app restrictions available to be pre-configured for the product. 244 "kind": "A String", # Deprecated. 245 "restrictions": [ # The set of restrictions that make up this schema. 246 { # A restriction in the App Restriction Schema represents a piece of configuration that may be pre-applied. 247 "defaultValue": { # A typed value for the restriction. # The default value of the restriction. bundle and bundleArray restrictions never have a default value. 248 "type": "A String", # The type of the value being provided. 249 "valueBool": True or False, # The boolean value - this will only be present if type is bool. 250 "valueInteger": 42, # The integer value - this will only be present if type is integer. 251 "valueMultiselect": [ # The list of string values - this will only be present if type is multiselect. 252 "A String", 253 ], 254 "valueString": "A String", # The string value - this will be present for types string, choice and hidden. 255 }, 256 "description": "A String", # A longer description of the restriction, giving more detail of what it affects. 257 "entry": [ # For choice or multiselect restrictions, the list of possible entries' human-readable names. 258 "A String", 259 ], 260 "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. 261 "A String", 262 ], 263 "key": "A String", # The unique key that the product uses to identify the restriction, e.g. "com.google.android.gm.fieldname". 264 "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. 265 # Object with schema name: AppRestrictionsSchemaRestriction 266 ], 267 "restrictionType": "A String", # The type of the restriction. 268 "title": "A String", # The name of the restriction. 269 }, 270 ], 271}</pre> 272</div> 273 274<div class="method"> 275 <code class="details" id="getPermissions">getPermissions(enterpriseId, productId, x__xgafv=None)</code> 276 <pre>Retrieves the Android app permissions required by this app. 277 278Args: 279 enterpriseId: string, The ID of the enterprise. (required) 280 productId: string, The ID of the product. (required) 281 x__xgafv: string, V1 error format. 282 Allowed values 283 1 - v1 error format 284 2 - v2 error format 285 286Returns: 287 An object of the form: 288 289 { # Information about the permissions required by a specific app and whether they have been accepted by the enterprise. 290 "permission": [ # The permissions required by the app. 291 { # 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. The API can be used to read the set of permissions, and also to update the set to indicate that permissions have been accepted. 292 "permissionId": "A String", # An opaque string uniquely identifying the permission. 293 "state": "A String", # Whether the permission has been accepted or not. 294 }, 295 ], 296 "productId": "A String", # The ID of the app that the permissions relate to, e.g. "app:com.google.android.gm". 297}</pre> 298</div> 299 300<div class="method"> 301 <code class="details" id="list">list(enterpriseId, approved=None, language=None, maxResults=None, query=None, token=None, x__xgafv=None)</code> 302 <pre>Finds approved products that match a query, or all approved products if there is no query. 303 304Args: 305 enterpriseId: string, The ID of the enterprise. (required) 306 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. 307 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. 308 maxResults: integer, Defines how many results the list operation should return. The default number depends on the resource collection. 309 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). 310 token: string, Defines the token of the page to return, usually taken from TokenPagination. This can only be used if token paging is enabled. 311 x__xgafv: string, V1 error format. 312 Allowed values 313 1 - v1 error format 314 2 - v2 error format 315 316Returns: 317 An object of the form: 318 319 { 320 "pageInfo": { # Information about the current page. List operations that supports paging return only one "page" of results. This protocol buffer message describes the page that has been returned. # General pagination information. 321 "resultPerPage": 42, # Maximum number of results returned in one page. ! The number of results included in the API response. 322 "startIndex": 42, # Index of the first result returned in the current page. 323 "totalResults": 42, # Total number of results available on the backend ! The total number of results in the result set. 324 }, 325 "product": [ # Information about a product (e.g. an app) in the Google Play store, for display to an enterprise admin. 326 { # 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.) 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. 327 "appTracks": [ # The tracks visible to the enterprise. 328 { # Id to name association of a track. 329 "trackAlias": "A String", # A modifiable name for a track. This is the visible name in the play developer console. 330 "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. 331 }, 332 ], 333 "appVersion": [ # App versions currently available for this product. 334 { # This represents a single version of the app. 335 "isProduction": True or False, # True if this version is a production APK. 336 "track": "A String", # Deprecated, use trackId instead. 337 "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). 338 "A String", 339 ], 340 "versionCode": 42, # Unique increasing identifier for the app version. 341 "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"). 342 }, 343 ], 344 "authorName": "A String", # The name of the author of the product (for example, the app developer). 345 "availableCountries": [ # The countries which this app is available in. 346 "A String", 347 ], 348 "availableTracks": [ # Deprecated, use appTracks instead. 349 "A String", 350 ], 351 "category": "A String", # The app category (e.g. RACING, SOCIAL, etc.) 352 "contentRating": "A String", # The content rating for this app. 353 "description": "A String", # The localized promotional description, if available. 354 "detailsUrl": "A String", # A link to the (consumer) Google Play details page for the product. 355 "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. 356 "features": [ # Noteworthy features (if any) of this product. 357 "A String", 358 ], 359 "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. 360 "lastUpdatedTimestampMillis": "A String", # The approximate time (within 7 days) the app was last published, expressed in milliseconds since epoch. 361 "minAndroidSdkVersion": 42, # The minimum Android SDK necessary to run the app. 362 "permissions": [ # A list of permissions required by the app. 363 { # 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. The API can be used to read the set of permissions, and also to update the set to indicate that permissions have been accepted. 364 "permissionId": "A String", # An opaque string uniquely identifying the permission. 365 "state": "A String", # Whether the permission has been accepted or not. 366 }, 367 ], 368 "productId": "A String", # A string of the form *app:<package name>*. For example, app:com.google.android.gm represents the Gmail app. 369 "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). 370 "recentChanges": "A String", # A description of the recent changes made to the app. 371 "requiresContainerApp": True or False, # Deprecated. 372 "screenshotUrls": [ # A list of screenshot links representing the app. 373 "A String", 374 ], 375 "signingCertificate": { # The certificate used to sign this product. 376 "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.) 377 "certificateHashSha256": "A String", # The base64 urlsafe encoded SHA2-256 hash of the certificate. 378 }, 379 "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. 380 "title": "A String", # The name of the product. 381 "workDetailsUrl": "A String", # A link to the managed Google Play details page for the product, for use by an Enterprise admin. 382 }, 383 ], 384 "tokenPagination": { # Pagination information returned by a List operation when token pagination is enabled. List operations that supports paging return only one "page" of results. This protocol buffer message describes the page that has been returned. When using token pagination, clients should use the next/previous token to get another page of the result. The presence or absence of next/previous token indicates whether a next/previous page is available and provides a mean of accessing this page. ListRequest.page_token should be set to either next_page_token or previous_page_token to access another page. # Pagination information for token pagination. 385 "nextPageToken": "A String", # Tokens to pass to the standard list field 'page_token'. Whenever available, tokens are preferred over manipulating start_index. 386 "previousPageToken": "A String", 387 }, 388}</pre> 389</div> 390 391<div class="method"> 392 <code class="details" id="unapprove">unapprove(enterpriseId, productId, x__xgafv=None)</code> 393 <pre>Unapproves the specified product (and the relevant app permissions, if any) 394 395Args: 396 enterpriseId: string, The ID of the enterprise. (required) 397 productId: string, The ID of the product. (required) 398 x__xgafv: string, V1 error format. 399 Allowed values 400 1 - v1 error format 401 2 - v2 error format 402</pre> 403</div> 404 405</body></html>