Skip to content

Electron Application Get Upgrade Strategy

Interface Description: Get corresponding upgrade strategy based on client version number, compatible with the official Electron upgrade interface.

📮 Request Information

Request Address

GET http://0.0.0.0:8888/v1/electron/upgrade?electronKey=kPUtUMDIjBhS48q5771pow&versionName=1.1.1&appointVersionName=&devModelKey=&devKey=&platform=darwin&arch=arm64

Request Headers

Parameter NameRequiredTypeExample ValueDescription
X-AccessKeyYesstringmui2W50H1j-OC4xD6PgQagAccess Key

Request Parameter Description

Parameter NameRequiredTypeExample ValueDescription
electronKeyYesstringkPUtUMDIjBhS48q5771powElectron application unique identifier
versionNameYesstring1.0.0Version number recorded in system
appointVersionNameNostring1.0.1Expected upgrade version name, defaults to latest version if not provided or empty
appointVersionCodeNoint0Expected upgrade version number, defaults to latest version if not provided or set to 0
devModelKeyNostringstv1Device model unique identifier
devKeyNostringLOYlLXNy7wDevice unique identifier (can use MAC address as unique identifier)
platformYesstringlinuxOperating system: linux, darwin, windows
archYesstringx64Machine architecture: x64, arm64

📮 Response Information

Success Response Body

json
{
  "upgradeType": 1,
  "promptUpgradeContent": "Prompt upgrade content",
  "version": "1.2.0",
  "files": [
    {
      "url": "https://api.upgrade.toolsetlink.com/v1/electron/download.AppImage?electronKey=kPUtUMDIjBhS48q5771pow&versionId=7",
      "sha512": "sNEx4hgG+cxFAULCDl9uOXJN+i4o/ND0adGphOP4Atbthvfmqb4uyLTENrrCyAIy0zaRxmFtI2aHiS/Da2uOyw==",
      "size": 153453614
    },
    {
      "url": "https://api.upgrade.toolsetlink.com/v1/electron/download.AppImage?electronKey=kPUtUMDIjBhS48q5771pow&versionId=7",
      "sha512": "sNEx4hgG+cxFAULCDl9uOXJN+i4o/ND0adGphOP4Atbthvfmqb4uyLTENrrCyAIy0zaRxmFtI2aHiS/Da2uOyw==",
      "size": 153453614
    }
  ],
  "path": "https://api.upgrade.toolsetlink.com/v1/electron/download.AppImage?electronKey=kPUtUMDIjBhS48q5771pow&versionId=7",
  "sha512": "sSrgmnph5Cr2AuZwCEWXD90JiJ2JW0RnqLf8cXSxusHLssCPRlAFtpER74Rlw/LglbOlcYvh+IO3jsAxAdLQmw==",
  "releaseDate": ""
}

Response Body Parameter Description

Return content is consistent with the official packaged yml file content.

Parameter NameTypeExample ValueDescription
upgradeTypeintPrompt upgrade type: 1: Prompt upgrade; 2: Silent upgrade; 3: Force upgrade
prompt_upgrade_contentstringPrompt upgrade content
versionstringVersion number
pathstringUpdate file download path
sha512stringUpdate file sha512 checksum value

Typical Error Response Body

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

📊 Status Codes

HTTP Status CodeCodeScenario DescriptionSolution
200Request successful, obtained upgrade strategy
400400001Illegal request
400400002Missing parameters
400400003Invalid parameters
400400004Invalid headers
400400005Invalid request body
401401001Authentication failed
401401002Signature verification failed
404404001Resource not found
404404002Query record not found
404404003Processing method not found
404404004Request not found
429429001Application task strategy request rate limitCurrent upgrade task configuration's request rate limit has been reached, please try again later.
500500001Server internal errorContact us Contact Us
500500002Server internal data validation failedContact us Contact Us

toolsetlink@163.com