Skip to content

Event Reporting

API Description: Report corresponding content based on different event types.

Data from reported event types will be reflected in the system's statistical data.

📮 Request Information

Request URL

POST https://api.upgrade.toolsetlink.com/v1/app/report

Request Headers

Parameter NameRequiredTypeExample ValueDescription
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. The server verifies that the timestamp differs from the server time by no more than ±5 minutes
  2. The server checks if the Nonce value already exists (to prevent duplicate requests)

Request Body Parameters

Parameter NameRequiredTypeExample ValueDescription
eventType Yes string app_start Event type:
app_start Application launch event
app_upgrade_download Application upgrade-download event
app_upgrade_upgrade Application upgrade-upgrade event
appKey Yes LOYlLXNy7wV3ySuh0XgtSg LOYlLXNy7wV3ySuh0XgtSg Unique application identifier, same value as urlKey and fileKey
timestamp Yes string 2025-02-17T10:34:55+08:00 Event occurrence time
eventData Yes Extended field
(Event type app_start Application launch event)
- launchTime Yes string 2025-02-17T10:34:55+08:00 Application launch time in RFC3339 format
- versionCode Yes int 10 Current application version code
- devModelKey No string stv1 Unique device model identifier
- devKey No string 89c8b3d5f2a74e1b Unique device identifier (can use MAC address as unique identifier)
- target No string darwin Device system
- arch No string x86_64 Device architecture
eventData Yes Extended field
(Event type app_upgrade_download Application upgrade-download event)
- downloadVersionCode Yes int 11 Upgrade version returned by upgrade strategy
- codeYesint0
0Download successful
1Download failed (general)
1001HTTP error during application file download
1002Insufficient space for file download
1003File operation error (creation/movement/renaming failed)
1004File MD5 verification failed
- versionCode Yes int 10 Current application version code
- devModelKey No string stv1 Unique device model identifier
- devKey No string 89c8b3d5f2a74e1b Unique device identifier (can use MAC address as unique identifier)
- target No string darwin Device system
- arch No string x86_64 Device architecture
eventData Yes Extended field
(Event type app_upgrade_upgrade Application upgrade-upgrade event)
- upgradeVersionCode Yes int 11 Upgrade version returned by upgrade strategy
- codeYesint0
0Upgrade successful
1Upgrade failed (general)
- versionCode Yes int 10 Current application version code
- devModelKey No string stv1 Unique device model identifier
- devKey No string 89c8b3d5f2a74e1b Unique device identifier (can use MAC address as unique identifier)
- target No string darwin Device system
- arch No string x86_64 Device architecture

Request Body Examples

app_download Application-download event (This event is automatically recorded when calling the first download API, no manual request needed)

json
{
    "eventType": "app_download",
    "timestamp": "2025-02-17T10:34:55+08:00",
    "appKey": "SkEgKQ4SyLmzazl31fJnAw"
}

app_start Application-launch event

json
{
    "eventType": "app_start",
    "timestamp": "2025-02-17T10:34:55+08:00",
    "appKey": "SkEgKQ4SyLmzazl31fJnAw",
    "eventData": {
      "launchTime": "2025-02-17T10:34:55+08:00",
      "versionCode": 1,
      "target": "darwin",
      "arch": "x86_64",
      "devModelKey": "stv1",
      "devKey": "LOYlLXNy7w"
    }
}

app_upgrade_get_strategy Application upgrade-get upgrade strategy event (This event is automatically recorded when calling the get latest version API, no manual request needed)

json
{
    "eventType": "app_upgrade_get_strategy",
    "timestamp": "2025-02-17T10:34:55+08:00",
    "appKey": "SkEgKQ4SyLmzazl31fJnAw",
    "eventData": {
      "versionCode": 1,
      "target": "darwin",
      "arch": "x86_64",
      "devModelKey": "stv1",
      "devKey": "LOYlLXNy7w"
    }
}

app_upgrade_download Application upgrade-download event

json
{
    "eventType": "app_upgrade_download",
    "timestamp": "2025-02-17T10:34:55+08:00",
    "appKey": "SkEgKQ4SyLmzazl31fJnAw",
    "eventData": {
      "downloadVersionCode": 2,
      "code": 0,
      "versionCode": 1,
      "target": "darwin",
      "arch": "x86_64",
      "devModelKey": "stv1",
      "devKey": "LOYlLXNy7w"
    }
}

app_upgrade_upgrade Application upgrade-upgrade event

json
{
    "eventType": "app_upgrade_upgrade",
    "timestamp": "2025-02-17T10:34:55+08:00",
    "appKey": "SkEgKQ4SyLmzazl31fJnAw",
    "eventData": {
      "upgradeVersionCode": 2,
      "code": 0,
      "versionCode": 1,
      "target": "darwin",
      "arch": "x86_64",
      "devModelKey": "stv1",
      "devKey": "LOYlLXNy7w"
    }
}

📮 Response Information

Successful Response Body

json
{
  "code": 200,
  "msg": "Report successful"
}

Typical Error Response Body

json
{
  "code": 400002,
  "msg": "Parameter missing"
}

📊 Status Codes

HTTP Status CodeCodeScenario DescriptionSolution
2000Request successful
400400001Invalid request
400400002Parameter missing
400400003Invalid parameter
400400004Invalid header
400400005Invalid body
401401001Authentication failed
401401002Signature verification failed
404404001Resource not found
404404002Record not found
404404003Processing method not found
404404004Request not found
500500001Server internal errorPlease contact us Contact Us
500500002Server internal data verification failedPlease contact us Contact Us

toolsetlink@163.com