Skip to content

Linux Application Upgrade Strategy API

API Description: Get the corresponding upgrade strategy based on the client's version number

📮Request Information

Request URL

POST https://api.upgrade.toolsetlink.com/v1/lnx/upgrade

Request Headers

Parameter NameRequiredTypeExampleDescription
X-TimestampYesstring2025-02-17T10:34:55+08:00Request time in RFC3339 format
X-NonceYesstringfc812cc0b9b51e8cUnique random string (at least 16 characters)
X-AccessKeyYesstringmui2W50H1j-OC4xD6PgQagAccessKey secret
X-SignatureYesstring3603437250c2df51fc46426ac79d8995Request signature Signature Rules
Content-TypeYesstringapplication/json

🔐 Anti-Replay Attack Mechanism

  1. Server verifies that the timestamp difference with server time does not exceed ±5 minutes
  2. Server checks if the Nonce value already exists (to prevent duplicate requests)

Request Body

json
{
    "lnxKey": "isVZBUvkFhv6oHxk_X-D0Q",
    "arch": "x64",
    "versionCode": 1,
    "appointVersionCode": 0,
    "devModelKey": "stv1",
    "devKey": "LOYlLXNy7w"
}

Request Body Parameter Description

Parameter NameRequiredTypeExampleDescription
lnxKeyYesstringisVZBUvkFhv6oHxk_X-D0QUnique identifier for Linux application
versionCodeYesint1Client version code
appointVersionCodeNoint0Expected upgrade version code, default to latest if not provided or 0
devModelKeyNostringstv1Unique device model identifier
devKeyNostringLOYlLXNy7wUnique device identifier (can use mac address)
archYesstringx64Machine architecture: x64, arm64

📮Response Information

Success Response Body

json
{
  "code": 200,
  "msg": "New version found",
  "data": {
    "lnxKey": "isVZBUvkFhv6oHxk_X-D0Q",
    "packageName": "com.a.c",
    "versionName": "v2",
    "versionCode": 2,
    "urlPath": "https://cdn.upgrade.toolsetlink.com/upgrade/2025-07-02/image/20250702102511_dl-logo-48x.png",
    "urlFileSize": 7213,
    "urlFileMd5": "",
    "upgradeType": 1,
    "promptUpgradeContent": "Prompt content"
  }
}

Response Body Parameter Description

Parameter NameTypeExampleDescription
apkKeystringisVZBUvkFhv6oHxk_X-D0QUnique identifier for Android application
packageNamestringcom.a.cAndroid application package name
versionNamestringv1Version name
versionCodeint1Version code
urlPathstringhttp://file.com/2.apkFile download URL
urlFileSizeint7213File size (bytes)
urlFileMd5stringisVZBUvkFhv6oHxkFile MD5 hash
upgradeTypeint1Upgrade type: 1: Prompt upgrade; 2: Silent upgrade; 3: Forced upgrade
promptUpgradeContentstringPrompt contentUpgrade prompt description

Typical Error Response Body

json
{
  "code": 404001,
  "msg": "No available version found",
  "docs": "No corresponding application version found. Please confirm if it has been correctly created in the system. Please refer to the documentation: http://upgrade.toolsetlink.com/upgrade/recommend/apk/app-version.html",
  "data": null
}

📊Status Codes

HTTP Status CodecodeScenario DescriptionSolution
2000Request successful, already on latest version
200200Request successful, upgrade strategy found
400400001Invalid request
400400002Missing parameters
400400003Invalid parameters
400400004Invalid headers
400400005Invalid request body
401401001Authentication failed
401401002Signature verification failed
404404001Resource not found
404404002Record not found
404404003Processing method not found
404404004Request not found
429429001Application task strategy request rate limitThe configured request rate limit for upgrade tasks has been reached. Please try again later.
500500001Internal server errorPlease contact us Contact Us
500500002Internal server data validation failedPlease contact us Contact Us

toolsetlink@163.com