Mac Application Upgrade Strategy API
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/mac/upgrade
Request Headers
| Parameter Name | Required | Type | Example | Description |
|---|---|---|---|---|
| X-Timestamp | Yes | string | 2025-02-17T10:34:55+08:00 | Request time in RFC3339 format |
| X-Nonce | Yes | string | fc812cc0b9b51e8c | Unique random string (at least 16 characters) |
| X-AccessKey | Yes | string | mui2W50H1j-OC4xD6PgQag | AccessKey |
| X-Signature | Yes | string | 3603437250c2df51fc46426ac79d8995 | Request signature Signature Rules |
| Content-Type | Yes | string | application/json |
🔐 Anti-replay Attack Mechanism
- Server verifies that the timestamp difference from server time does not exceed ±5 minutes
- Server checks if Nonce value already exists (prevents duplicate requests)
Request Body
json
{
"macKey": "isVZBUvkFhv6oHxk_X-D0Q",
"arch": "x64",
"versionCode": 1,
"appointVersionCode": 0,
"devModelKey": "stv1",
"devKey": "LOYlLXNy7w"
}Request Body Parameter Description
| Parameter Name | Required | Type | Example | Description |
|---|---|---|---|---|
| macKey | Yes | string | isVZBUvkFhv6oHxk_X-D0Q | Unique identifier for Mac application |
| versionCode | Yes | int | 1 | Client version code |
| appointVersionCode | No | int | 0 | Desired upgrade version code, default to latest if 0 or not provided |
| devModelKey | No | string | stv1 | Unique identifier for device model |
| devKey | No | string | LOYlLXNy7w | Unique device identifier (can use mac as identifier) |
| arch | Yes | string | x64 | Machine architecture: x64, arm64 |
📮Response Information
Success Response Body
json
{
"code": 200,
"msg": "New version found",
"data": {
"macKey": "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 Name | Type | Example | Description |
|---|---|---|---|
| macKey | string | isVZBUvkFhv6oHxk_X-D0Q | Unique identifier for Mac application |
| packageName | string | com.a.c | Mac application package name |
| versionName | string | v1 | Version name |
| versionCode | int | 1 | Version code |
| urlPath | string | http://file.com/2.apk | File download URL |
| urlFileSize | int | 7213 | File size (in bytes) |
| urlFileMd5 | string | isVZBUvkFhv6oHxk | File MD5 hash |
| upgradeType | int | 1 | Upgrade method: 1: Prompt upgrade; 2: Silent upgrade; 3: Forced upgrade |
| promptUpgradeContent | string | Prompt content | Prompt upgrade description content |
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 Code | code | Scenario Description | Solution |
|---|---|---|---|
| 200 | 0 | Request successful, already at the latest version | |
| 200 | 200 | Request successful, upgrade strategy obtained | |
| 400 | 400001 | Invalid request | |
| 400 | 400002 | Missing parameters | |
| 400 | 400003 | Invalid parameters | |
| 400 | 400004 | Invalid headers | |
| 400 | 400005 | Invalid request body | |
| 401 | 401001 | Authentication failed | |
| 401 | 401002 | Signature verification failed | |
| 404 | 404001 | Resource not found | |
| 404 | 404002 | Record not found | |
| 404 | 404003 | Processing method not found | |
| 404 | 404004 | Request not found | |
| 429 | 429001 | Request rate limit for application task strategy | The request rate limit for the current upgrade task configuration has been reached. Please try again later. |
| 500 | 500001 | Internal server error | Please contact us Contact Us |
| 500 | 500002 | Internal server data validation failed | Please contact us Contact Us |