Event Reporting
Interface Description: Report corresponding content based on different event types.
Based on the reported event type data, it 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 Name | Required | Type | Example Value | 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 | Access Key |
| X-Signature | Yes | string | 3603437250c2df51fc46426ac79d8995 | Request signature Signature Rules |
| Content-Type | Yes | string | application/json |
🔐 Replay Attack Prevention Mechanism
- Server validates timestamp difference with server time not exceeding ±5 minutes
- Server checks if Nonce value already exists (prevents duplicate requests)
Request Body Parameter Description
| Parameter Name | Required | Type | Example Value | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| eventType | Yes | string | app_start | Event Type: app_start Application startup event app_upgrade_download Application upgrade - download event app_upgrade_upgrade Application upgrade - upgrade event | ||||||||||||
| appKey | Yes | LOYlLXNy7wV3ySuh0XgtSg | LOYlLXNy7wV3ySuh0XgtSg | Application unique identifier, value is the same as urlKey and fileKey | ||||||||||||
| timestamp | Yes | string | 2025-02-17T10:34:55+08:00 | Event occurrence time | ||||||||||||
| eventData | Yes | Extended fields (Event type app_start Application startup event) | ||||||||||||||
| - launchTime | Yes | string | 2025-02-17T10:34:55+08:00 | Application startup time in RFC3339 format | ||||||||||||
| - versionCode | Yes | int | 10 | Current application version number | ||||||||||||
| - devModelKey | No | string | stv1 | Device model unique identifier | ||||||||||||
| - devKey | No | string | 89c8b3d5f2a74e1b | Device unique identifier (can use mac as unique identifier) | ||||||||||||
| - target | No | string | darwin | Device system | ||||||||||||
| - arch | No | string | x86_64 | Device architecture | ||||||||||||
| eventData | Yes | Extended fields (Event type app_upgrade_download Application upgrade - download event) | ||||||||||||||
| - downloadVersionCode | Yes | int | 11 | Upgrade version returned by upgrade strategy | ||||||||||||
| - code | Yes | int | 0 |
| ||||||||||||
| - versionCode | Yes | int | 10 | Current application version number | ||||||||||||
| - devModelKey | No | string | stv1 | Device model unique identifier | ||||||||||||
| - devKey | No | string | 89c8b3d5f2a74e1b | Device unique identifier (can use mac as unique identifier) | ||||||||||||
| - target | No | string | darwin | Device system | ||||||||||||
| - arch | No | string | x86_64 | Device architecture | ||||||||||||
| eventData | Yes | Extended fields (Event type app_upgrade_upgrade Application upgrade - upgrade event) | ||||||||||||||
| - upgradeVersionCode | Yes | int | 11 | Upgrade version returned by upgrade strategy | ||||||||||||
| - code | Yes | int | 0 |
| ||||||||||||
| - versionCode | Yes | int | 10 | Current application version number | ||||||||||||
| - devModelKey | No | string | stv1 | Device model unique identifier | ||||||||||||
| - devKey | No | string | 89c8b3d5f2a74e1b | Device unique identifier (can use mac as unique identifier) | ||||||||||||
| - target | No | string | darwin | Device system | ||||||||||||
| - arch | No | string | x86_64 | Device architecture | ||||||||||||
Request Body Examples
app_download Application - download event (Automatically recorded when calling first download interface, no need to request)
json
{
"eventType": "app_download",
"timestamp": "2025-02-17T10:34:55+08:00",
"appKey": "SkEgKQ4SyLmzazl31fJnAw"
}app_start Application - startup 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 (Automatically recorded when calling get latest version interface, no need to request)
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
Success Response Body
json
{
"code": 200,
"msg": "Report successful"
}Typical Error Response Body
json
{
"code": 400002,
"msg": "Missing parameters"
}📊 Status Codes
| HTTP Status Code | Code | Scenario Description | Solution |
|---|---|---|---|
| 200 | 0 | Request successful | |
| 400 | 400001 | Illegal 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 does not exist | |
| 404 | 404002 | Query record does not exist | |
| 404 | 404003 | Processing method does not exist | |
| 404 | 404004 | Request does not exist | |
| 500 | 500001 | Server internal error | Contact us Contact Us |
| 500 | 500002 | Server internal data validation failed | Contact us Contact Us |