Uploading an APK file
Use this method to upload an .apk
file for publication.
It can be further updated.
Key Points to Note:
.apk
files only;- file size should not exceed 2.5 MB
- uploaded APK version should be higher than the current active one.
You can upload two APK files at once:
- with different developer signatures to exclude update errors from users. When uploading to the showcase, RuStore will render a file with a similar signature for each user separately.
- which support various services (Huawei Mobile Services and Google Mobile Services) for RuStore to give the user an APK file, which includes services adapted to his device.
- when uploading multiple files, be sure to specify which one is Huawei Mobile Services and which file will be available to all users by default. You can upload no more than 10 files.
note
Please note that as part of the July 20 update, a required IsMainApk
parameter was added to the method below. We also ask you to update your pipelines.
Interaction parameters
POST
https://public-api.rustore.ru/public/v1/application/{packageName}/version/{versionId}/apk
Attribute | Type | Required | Location | Description |
---|---|---|---|---|
Public-Token | string | Yes | header | Access token to Public API Rustore. |
packageName | string | Yes | path | App package name |
versionId | number | Yes | path | App version |
servicesType (new) | string | No | query | Type of service used by the app. Possible options: • HMS — for APK files with Huawei Mobile Services; • Unknown is set by default if the field is empty |
isMainApk (new) | boolean | Yes | query | Attribute that is assigned to the main apk file. Values: • true — main APK file;false — by default. |
Form data
Attribute | Type | Required | Location | Description |
---|---|---|---|---|
file | multipart | Yes | N/A | Binary File |
Response example
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
code | string | Yes | Response code | error /OK |
message | string | No | Decoded response code | Error detail. Possible options: • / `Maximum number of apk files already uploaded`; <br/>• / Main apk file already uploaded ;• / `APK file with the Huawei Mobile Services is already uploaded`;<br/>• / APK file with the Huawei Mobile Services can not be main file ; • / `APK file has different version code than the one previously uploaded`; <br/>• / Version code must be larger than that of the previous one ; • / `Package does not match the previous version`; <br/>• / Package with this name already exists. Rename the package . |
timestamp | timestamptz | Yes | Response time | 2022-07-08T13:24:41.8328711+03:00 |
Request example
curl --location --request POST 'https://public-api.rustore.ru/public/v1/application/com.package.example/version/123/apk?servicesType=Unknown&isMainApk=true'' \
--header 'Public-Token: {YOURtoken}' \
--form 'file=@"/Users/User/Downloads/package.apk"'