Uploading screenshots
This method allows uploading app screenshots.
Key Points to Note:
-
screenshots can be either vertical or horizontal;
-
screenshot aspect ratio - 16:9 (vertical) and 9:16 (horizontal);
-
uploaded file sides - not less than 320px and not over than 3840px;
-
upload file format:
.jpg
or.png
; -
file size should not exceed 3 MB;
-
various orientations are not allowed. For instance, if the user has already uploaded a vertical orientation (
PORTRAIT
) and attempts to load a horizontal one (LANDSCAPE
), an error will be returned in response to the request. -
when uploading more than 10 screenshots, existing screenshots will become inactive. For example, if you upload two screenshots with the
"ordinal" = 7
parameter, the last uploaded screenshot will be active.
Interaction parameters
POST
https://public-api.rustore.ru/public/v1/application/{packageName}/version/{versionId}/image/screenshot/{orientation}/{ordinal}
Attribute | Type | Required | Location | Description |
---|---|---|---|---|
Public-Token | string | Yes | header | Access token to Public API Rustore. |
packageName | number | Yes | path | App ID |
versionId | number | Yes | path | App version |
orientation | string | Yes | path | Image orientations. Possible options: • LANDSCAPE — horizontal; • PORTRAIT — vertical. |
ordinal | number | Yes | path | Screenshot serial number Possible values: from 0 to 9 . |
Form data
Attribute | Type | Required | Description |
---|---|---|---|
file | multipart/form-data | Yes | File |
Response example
Attribute | Type | Required | Description | Example |
---|---|---|---|---|
code | string | Yes | Response code | error /OK |
message | string | No | Decoded response code | N/A |
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/image/screenshot/landscape/1' \
--header 'Content-Type: application/json' \
--header 'Public-Token: {YOURtoken}' \
--form 'file=@"/Users/User/Downloads/img.jpg"'