Skip to content

URL Application Upgrade Strategy

API Description: Based on the client's version number, obtain the corresponding upgrade strategy

📮Request Information

Request URL

POST https://api.upgrade.toolsetlink.com/v1/url/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-OC4xD6PgQagSecret key - AccessKey
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
{
    "urlKey": "SkEgKQ4SyLmzazl31fJnAw",
    "versionCode": 1,
    "appointVersionCode": 0,
    "devModelKey": "stv1",
    "devKey": "LOYlLXNy7w"
}

Request Body Parameter Description

Parameter NameRequiredTypeExampleDescription
urlKeyYesstringSkEgKQ4SyLmzazl31fJnAwUnique identifier for URL application
versionCodeYesint1Version code recorded in the system
appointVersionCodeNoint2Expected upgrade version code, 0 for latest version
devModelKeyNostringstv1Unique device model identifier
devKeyNostring89c8b3d5f2a74e1bUnique device identifier (can use MAC address)

📮Response Information

Success Response Body

json
{
  "code": 200,
  "msg": "New version found",
  "data": {
    "urlKey": "SkEgKQ4SyLmzazl31fJnAw",
    "versionName": "v2",
    "versionCode": 2,
    "urlPath": "http://file.com/2.exe",
    "upgradeType": 1,
    "promptUpgradeContent": "Prompt content"
  }
}

Response Body Parameter Description

Parameter NameTypeExampleDescription
urlKeystringSkEgKQ4SyLmzazl31fJnAwUnique identifier for URL application
versionNamestringv1Version name
versionCodeint1Version code
urlPathstringhttp://file.com/2.exeFile download address
upgradeTypeint1Upgrade type: 1: Prompt upgrade; 2: Silent upgrade; 3: Forced upgrade
promptUpgradeContentstringOptimized codePrompt upgrade 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/url/app-version.html",
  "data": null
}

📊Status Codes

HTTP Status CodecodeScenario DescriptionSolution
2000Request successful, current is latest version
200200Request successful, upgrade strategy obtained
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 request rate limit configured for the upgrade task 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