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 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 | Secret key AccessKey |
| X-Signature | Yes | string | 3603437250c2df51fc46426ac79d8995 | Request signature Signature Rules |
| Content-Type | Yes | string | application/json |
🔐 Anti-replay Attack Mechanism
- The server verifies that the timestamp differs from the server time by no more than ±5 minutes
- The server checks if the Nonce value already exists (to prevent duplicate requests)
Request Body Parameters
| Parameter Name | Required | Type | Example Value | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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 | ||||||||||||
| - code | Yes | int | 0 |
| ||||||||||||
| - 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 | ||||||||||||
| - code | Yes | int | 0 |
| ||||||||||||
| - 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 Code | Code | Scenario Description | Solution |
|---|---|---|---|
| 200 | 0 | Request successful | |
| 400 | 400001 | Invalid request | |
| 400 | 400002 | Parameter missing | |
| 400 | 400003 | Invalid parameter | |
| 400 | 400004 | Invalid header | |
| 400 | 400005 | Invalid 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 | |
| 500 | 500001 | Server internal error | Please contact us Contact Us |
| 500 | 500002 | Server internal data verification failed | Please contact us Contact Us |