Skip to main content

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

AttributeTypeRequiredLocationDescription
Public-TokenstringYesheaderAccess token to Public API Rustore.
packageNamestringYespathApp package name
versionIdnumberYespathApp version
servicesType
(new)
stringNoqueryType 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)
booleanYesqueryAttribute that is assigned to the main apk file. Values:
true — main APK file;
false — by default.

Form data

AttributeTypeRequiredLocationDescription
filemultipartYesN/ABinary File

Response example

AttributeTypeRequiredDescriptionExample
codestringYesResponse codeerror/OK
messagestringNoDecoded response codeError detail. Possible options:
/ `Maximum number of apk files already uploaded`; <br/>&bull; / Main apk file already uploaded;
/ `APK file with the Huawei Mobile Services is already uploaded`;<br/>&bull; / APK file with the Huawei Mobile Services can not be main file;
/ `APK file has different version code than the one previously uploaded`; <br/>&bull; / Version code must be larger than that of the previous one;
/ `Package does not match the previous version`; <br/>&bull; / Package with this name already exists. Rename the package.
timestamptimestamptzYesResponse time2022-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"'