Requires authorization
Creates a new APK without uploading the APK itself to Google Play, instead hosting the APK at a specified URL. This function is only available to enterprises using Google Play for Work whose application is configured to restrict distribution to the enterprise domain.
Request
HTTP request
POST https://www.googleapis.com/androidpublisher/v2/applications/packageName/edits/editId/apks/externallyHosted
Parameters
Parameter name | Value | Description |
---|---|---|
Path parameters | ||
editId |
string |
Unique identifier for this edit. |
packageName |
string |
Unique identifier for the Android app that is being updated; for example, "com.spiffygame". |
Authorization
This request requires authorization with the following scope (read more about authentication and authorization).
Scope |
---|
https://www.googleapis.com/auth/androidpublisher |
Request body
In the request body, supply data with the following structure:
{ "externallyHostedApk": { "packageName": string, "applicationLabel": string, "versionCode": integer, "versionName": string, "fileSize": long, "fileSha1Base64": string, "fileSha256Base64": string, "iconBase64": string, "minimumSdk": integer, "certificateBase64s": [ string ], "externallyHostedUrl": string, "maximumSdk": integer, "nativeCodes": [ string ], "usesFeatures": [ string ], "usesPermissions": [ { "name": string, "maxSdkVersion": integer } ] } }
Property name | Value | Description | Notes |
---|---|---|---|
externallyHostedApk |
nested object |
The definition of the externally-hosted APK and where it is located. | |
externallyHostedApk.packageName |
string |
The package name. | |
externallyHostedApk.applicationLabel |
string |
The application label. | |
externallyHostedApk.versionCode |
integer |
The version code of this APK. | |
externallyHostedApk.versionName |
string |
The version name of this APK. | |
externallyHostedApk.fileSize |
long |
The file size in bytes of this APK. | |
externallyHostedApk.fileSha1Base64 |
string |
The SHA1 checksum of this APK, represented as a base64 encoded byte array. | |
externallyHostedApk.fileSha256Base64 |
string |
The SHA256 checksum of this APK, represented as a base64 encoded byte array. | |
externallyHostedApk.iconBase64 |
string |
The icon image from the APK, as a base64 encoded byte array. | |
externallyHostedApk.minimumSdk |
integer |
The minimum SDK targeted by this APK. | |
externallyHostedApk.certificateBase64s[] |
list |
A certificate (or array of certificates if a certificate-chain is used) used to signed this APK, represented as a base64 encoded byte array. | |
externallyHostedApk.externallyHostedUrl |
string |
The URL at which the APK is hosted. This must be an https URL. | |
externallyHostedApk.maximumSdk |
integer |
The maximum SDK supported by this APK (optional). | |
externallyHostedApk.nativeCodes[] |
list |
The native code environments supported by this APK (optional). | |
externallyHostedApk.usesFeatures[] |
list |
The features required by this APK (optional). | |
externallyHostedApk.usesPermissions[] |
list |
The permissions requested by this APK. | |
externallyHostedApk.usesPermissions[].name |
string |
The name of the permission requested. | |
externallyHostedApk.usesPermissions[].maxSdkVersion |
integer |
Optionally, the maximum SDK version for which the permission is required. |
Response
If successful, this method returns a response body with the following structure:
{ "externallyHostedApk": { "packageName": string, "applicationLabel": string, "versionCode": integer, "versionName": string, "fileSize": long, "fileSha1Base64": string, "fileSha256Base64": string, "iconBase64": string, "minimumSdk": integer, "certificateBase64s": [ string ], "externallyHostedUrl": string, "maximumSdk": integer, "nativeCodes": [ string ], "usesFeatures": [ string ], "usesPermissions": [ { "name": string, "maxSdkVersion": integer } ] } }
Property name | Value | Description | Notes |
---|---|---|---|
externallyHostedApk |
nested object |
The definition of the externally-hosted APK and where it is located. | |
externallyHostedApk.packageName |
string |
The package name. | |
externallyHostedApk.applicationLabel |
string |
The application label. | |
externallyHostedApk.versionCode |
integer |
The version code of this APK. | |
externallyHostedApk.versionName |
string |
The version name of this APK. | |
externallyHostedApk.fileSize |
long |
The file size in bytes of this APK. | |
externallyHostedApk.fileSha1Base64 |
string |
The SHA1 checksum of this APK, represented as a base64 encoded byte array. | |
externallyHostedApk.fileSha256Base64 |
string |
The SHA256 checksum of this APK, represented as a base64 encoded byte array. | |
externallyHostedApk.iconBase64 |
string |
The icon image from the APK, as a base64 encoded byte array. | |
externallyHostedApk.minimumSdk |
integer |
The minimum SDK targeted by this APK. | |
externallyHostedApk.certificateBase64s[] |
list |
A certificate (or array of certificates if a certificate-chain is used) used to signed this APK, represented as a base64 encoded byte array. | |
externallyHostedApk.externallyHostedUrl |
string |
The URL at which the APK is hosted. This must be an https URL. | |
externallyHostedApk.maximumSdk |
integer |
The maximum SDK supported by this APK (optional). | |
externallyHostedApk.nativeCodes[] |
list |
The native code environments supported by this APK (optional). | |
externallyHostedApk.usesFeatures[] |
list |
The features required by this APK (optional). | |
externallyHostedApk.usesPermissions[] |
list |
The permissions requested by this APK. | |
externallyHostedApk.usesPermissions[].name |
string |
The name of the permission requested. | |
externallyHostedApk.usesPermissions[].maxSdkVersion |
integer |
Optionally, the maximum SDK version for which the permission is required. |