feat(system): add system status and software info endpoints

Add new endpoints to expose system status and software information:
- /system/getStatus returns current system status (online/offline)
- /system/getSoftwareInfo returns software version and build details
Update API documentation to include new endpoints
This commit is contained in:
2026-03-09 19:02:56 +08:00
parent 8b9a757bea
commit a142fb17a8
3 changed files with 89 additions and 2 deletions
+63 -1
View File
@@ -23,11 +23,73 @@ All API responses are returned in JSON format:
- For all requests: Authentication token and timestamp are sent in HTTP headers (prefixed with `X-`)
- For **POST** requests: Other data is sent in the request body as JSON
- For **GET** requests: All data is sent in HTTP headers (prefixed with `X-`)
- All requests require authentication (except `/register` and `/login`)
- All requests require authentication (except `/register`, `/login`, `/system/getStatus`, `/system/getSoftwareInfo`)
- Timestamps are in milliseconds (Unix timestamp)
---
## Get System Status
**Endpoint:** `/system/getStatus`
**Method:** GET
**Auth Required:** No
**Permission Level:** None
Get the current system status.
**Response:**
```json
{
"success": true,
"message": "getStatus",
"data": {
"Status": "Online"
}
}
```
| Field | Type | Description |
|-------|------|-------------|
| Status | string | System status: "Online" or "Offline" |
---
## Get Software Info
**Endpoint:** `/system/getSoftwareInfo`
**Method:** GET
**Auth Required:** No
**Permission Level:** None
Get software version and build information.
**Response:**
```json
{
"success": true,
"message": "getSoftwareInfo",
"data": {
"Name": "Super-frpc",
"Version": "0.0.1",
"Developer": "Madobi Nanami",
"BuildVer": 1,
"Description": "",
"BuildType": "debug"
}
}
```
| Field | Type | Description |
|-------|------|-------------|
| Name | string | Software name |
| Version | string | Software version |
| Developer | string | Developer name |
| BuildVer | int16 | Build version number |
| Description | string | Software description |
| BuildType | string | Build type: "debug" or "release" |
---
## Register User
**Endpoint:** `/register`