# 返回结果
API 请求总是返回 HTTP 200 状态码。
## 公共返回参数
每次接口调用请求,无论成功与否,系统都会返回以下参数:
| 名称 | 类型 | 描述 |
| --- | --- | --- |
| ACTION | String | 当前调用的 API 接口名称。 |
| CODE | String | 返回结果代号。`ok` 表签名机制示成功,返回其它值表示错误代码。 |
另外,对有数据返回的 API 结果,还会返回:
| 名称 | 类型 | 描述 |
| --- | --- | --- |
| DATA | String | API 返回数据,不同 API 接口的返回数据格式不同。 |
错误时,会返回以下结果:
| 名称 | 类型 | 描述 |
| --- | --- | --- |
| Message | String | API 返回错误时,附带的具体错误消息。 |
### 成功返回示例
```
{
"ACTION": "Status.Overview",
"CODE": "ok",
"DATA": {
"CPUUseRate": 0.0061,
"UpTime": {
"Now": 1515502309,
"NowH": "2018-01-09 20:51:49",
"Btime": 1515392965,
"Total": 109343,
"Idle": 109178,
"IdleRate": 0.9984
},
"LoadAvg": {
"Last1Min": 0,
"Last1MinRate": 0,
"Last5Min": 0.01,
"Last5MinRate": 0.0025,
"Last15Min": 0,
"Last15MinRate": 0
},
"MemInfo": {
"MemTotal": "489M",
"MemUsed": "423M",
"MemFree": "66M",
"MemUseRate": 0.8644,
"MemFreeRate": 0.1355,
"Buffers": "8.1M",
"Cached": "151M",
"RealMemUsed": "264M",
"RealMemUseRate": 0.5397,
"IsEnabledSwap": "Y",
"SwapTotal": "816M",
"SwapFree": "336M",
"SwapUsed": "480M",
"SwapUseRate": 0.5877,
"SwapFreeRate": 0.4122,
"IsDeleteSwap": "N",
"PhysicalMem": "512M",
"PhysicalMemValue": 536870912,
"KernelUseMem": "23M"
},
"Disks": [
{
"Name": "/",
"Total": "6.5G",
"Used": "2.7G",
"Free": "3.6G",
"UseRate": 0.412
},
{
"Name": "/boot",
"Total": "476M",
"Used": "25M",
"Free": "429M",
"UseRate": 0.0521
}
]
}
}
```
### 失败返回示例
```
{
"ACTION": "Status.Overview",
"CODE": "WrongModulePath",
"MESSAGE": "Wrong module path!"
}
```