Method: edits.apks.addexternallyhosted

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 organizations using Managed Play whose application is configured to restrict distribution to the organizations.

HTTP request

POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/externallyHosted

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
packageName

string

Package name of the app.

editId

string

Identifier of the edit.

Request body

The request body contains data with the following structure:

JSON representation
{
  "externallyHostedApk": {
    object (ExternallyHostedApk)
  }
}
Fields
externallyHostedApk

object (ExternallyHostedApk)

The definition of the externally-hosted APK and where it is located.

Response body

Response for creating a new externally hosted APK.

If successful, the response body contains data with the following structure:

JSON representation
{
  "externallyHostedApk": {
    object (ExternallyHostedApk)
  }
}
Fields
externallyHostedApk

object (ExternallyHostedApk)

The definition of the externally-hosted APK and where it is located.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/androidpublisher

ExternallyHostedApk

Defines an APK available for this application that is hosted externally and not uploaded to Google Play. This function is only available to organizations using Managed Play whose application is configured to restrict distribution to the organizations.

JSON representation
{
  "packageName": string,
  "applicationLabel": string,
  "versionCode": integer,
  "versionName": string,
  "fileSize": string,
  "fileSha1Base64": string,
  "fileSha256Base64": string,
  "iconBase64": string,
  "minimumSdk": integer,
  "certificateBase64s": [
    string
  ],
  "externallyHostedUrl": string,
  "maximumSdk": integer,
  "nativeCodes": [
    string
  ],
  "usesFeatures": [
    string
  ],
  "usesPermissions": [
    {
      object (UsesPermission)
    }
  ]
}
Fields
packageName

string

The package name.

applicationLabel

string

The application label.

versionCode

integer

The version code of this APK.

versionName

string

The version name of this APK.

fileSize

string (int64 format)

The file size in bytes of this APK.

fileSha1Base64

string

The sha1 checksum of this APK, represented as a base64 encoded byte array.

fileSha256Base64

string

The sha256 checksum of this APK, represented as a base64 encoded byte array.

iconBase64

string

The icon image from the APK, as a base64 encoded byte array.

minimumSdk

integer

The minimum SDK targeted by this APK.

certificateBase64s[]

string

A certificate (or array of certificates if a certificate-chain is used) used to sign this APK, represented as a base64 encoded byte array.

externallyHostedUrl

string

The URL at which the APK is hosted. This must be an https URL.

maximumSdk

integer

The maximum SDK supported by this APK (optional).

nativeCodes[]

string

The native code environments supported by this APK (optional).

usesFeatures[]

string

The features required by this APK (optional).

usesPermissions[]

object (UsesPermission)

The permissions requested by this APK.

UsesPermission

A permission used by this APK.

JSON representation
{
  "name": string,
  "maxSdkVersion": integer
}
Fields
name

string

The name of the permission requested.

maxSdkVersion

integer

Optionally, the maximum SDK version for which the permission is required.