System API Documentation
Base Path
/system
Endpoints
System Information
Returns system initialization status and version information.
Response
{
code: 200,
data: {
isInitialized: boolean,
version: string,
publishTime: number, // Unix timestamp
branch: string,
changeLog: string,
changeLogLink: string
}
}
System Configuration
Get Configuration
Retrieves system configuration.
Update Log Remove Frequency
PUT /config/log-remove-frequency
Request Body
{
logRemoveFrequency: number | null
}
Update Cron Concurrency
PUT /config/cron-concurrency
Request Body
{
cronConcurrency: number | null
}
Update Dependence Proxy
PUT /config/dependence-proxy
Request Body
{
dependenceProxy: string | null
}
Update Node Mirror
Request Body
{
nodeMirror: string | null
}
Update Python Mirror
PUT /config/python-mirror
Request Body
{
pythonMirror: string | null
}
Update Linux Mirror
Request Body
{
linuxMirror: string | null
}
System Operations
Check Updates
Checks for system updates.
Update System
Performs system update.
Reload System
Request Body
Send Notification
Request Body
{
title: string,
content: string
}
Command Management
Run Command
Request Body
Response Headers
Content-type: application/octet-stream
QL-Task-Pid: <process_id>
Stop Command
Request Body
{
command?: string,
pid?: number
}
Data Management
Export Data
Exports system data.
Import Data
Request
- Content-Type:
multipart/form-data
- Field:
data
(file)
Log Management
Get System Logs
Query Parameters
{
startTime?: string,
endTime?: string,
t?: string
}
Delete System Logs
Deletes system logs.
Error Handling
All endpoints follow the same error handling pattern:
- Errors are passed to the next middleware
- Most successful responses return
{ code: 200, data: ... }
- Error logging is handled by Winston logger
Notes
- All routes are protected by celebrate/Joi validation
- File operations use async fs promises
- Temporary files are stored in configured tmp path
- Log files include timestamps in format:
YYYY-MM-DD-HH-mm-ss-SSS