Get basic info

1. API Description

This API is used to get the device's basic information, including CPU, memory, up time, etc.

Request mode: POST [ip]/api/system/info

Administrator Rights Logged-in
Yes Yes

2. Input Parameters

None

3. Output Parameters

Name Type Description
status Int Status code
device-name String Device name
usbc-name String USB-C connection name, that is the name displayed on the computer when the device is connected to a computer via the USB OUT port
uptime Int Uptime, in seconds
cpu CPUInfo CPU information
mem MemInfo Memory information
datetime DateTimeInfo Date and time information
auto-reboot AutoRebootInfo Auto-reboot information
CPUInfo
Name Type Description
total Int The total time of CPU
idle Int The idle time of CPU
usage Int The CPU usage x 100
MemInfo
Name Type Description
total Int The system's total memory, in KB
avail Int The system's available memory, in KB
DateTimeInfo
Name Type Description
cur-time String The system time
Time format: yyyy-MM-dd HH:mm:ss
zonename String The time zone name
ntp-enable Boolean Whether NTP is enabled
true: Yes; false: No
ntp-server1 String The NTP server 1
ntp-server2 String The NTP server 2
AutoRebootInfo
Name Type Description
enable Boolean Enable auto-reboot
true: Enabled; false: Disabled
hour Int Time to auto-reboot, hour
min Int Time to auto-reboot, minute
week [Array] Weekly repeat
1: Monday; 2: Tuesday; 3: Wednesday; 4: Thursday; 5: Friday; 6: Saturday; 7: Sunday

4. Example

Getting the device's basic information.

Input Example
None
Output Example
{
    "device-name": "USBFUSION",
    "usbc-name": "USB Fusion USB-C",
    "uptime": 5640,
    "cpu": {
        "total": 1084415,
        "idle": 815485,
        "usage": 2620
    },
    "mem": {
        "total": 8069584,
        "avail": 6201548
    },
    "datetime": {
        "cur-time": "2024-04-11 09:44:45",
        "zonename": "Asia/Shanghai",
        "ntp-enable": true,
        "ntp-server1": "0.pool.ntp.org",
        "ntp-server2": "1.pool.ntp.org"
    },
    "auto-reboot": {
        "enable": true,
        "hour": 0,
        "min": 0,
        "week": [
            1,
            6
        ]
    },
    "status": 0
}

5. Error Code

No error code related to the API business logic. For other error codes, see Common Error Codes.

results matching ""

    No results matching ""