get-status接口
实时获取云平台的基本信息,主要有CPU利用率、内存使用量、网络吞吐量、平台安全设置、异常设备信息、日志等。
接口原型
协议 |
HTTP/HTTPS GET |
URL |
ip[:port]/sc_cloud/scapi/get-status |
数据格式 |
响应消息:Content-Type: application/json |
请求Cookies
名称 |
描述 |
mwcloud-sid |
用于标识当前登录的字符串 |
mwcloud-uid |
当前登录用户名 |
请求示例
GET /sc_cloud/scapi/get-status HTTP/1.1
Accept: application/json, text/plain, */*
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
响应参数
参数 |
描述 |
Content-Type |
取值为:'application/json; charset=UTF-8' |
Response Body
参数 |
描述 |
result |
返回码。 |
status |
云平台状态信息。 |
status
system-info
参数 |
描述 |
date-time |
当前系统时间,单位:秒。 |
cloud-version |
系统版本号。 |
system-status
参数 |
描述 |
cpu |
CPU利用率。 |
mem |
内存使用量。 |
net-tx |
网络发送吞吐量。 |
net-rx |
网络接收吞吐量。 |
app-settings
参数 |
描述 |
is-code |
设备注册到云平台是否需要邀请码。0:否 1:是。 |
code-value |
4位数邀请码。NULL:无邀请码。 |
is-http |
是否允许HTTP方式访问云平台。0:否 1:是。 |
http-port |
端口。 |
is-https |
是否允许HTTPS方式访问云平台。0:否 1:是。 |
https-port |
端口。 |
is-cert-valid |
CA证书是否有效。0:无效 1:有效。 |
is-certkey-valid |
CA私钥是否有效。0:无效 1:有效。 |
license-reg
参数 |
描述 |
status |
授权证书的状态码。取值如下:- 0:添加的授权证书有效。
- -20:未添加授权证书,则使用云平台默认的证书。
- -107:授权证书已过期。
- -10:证书错误。
|
user-name |
证书标题。 |
sn |
证书序列号。 |
license |
已授权证书的权限信息。 |
license
参数 |
描述 |
max-dev-count |
最多允许管理的设备个数。 |
max-convert-count |
最多允许添加的协议流转换任务个数。 |
max-srt-count |
最多允许添加的SRT输入输出流个数。 |
limited-date |
授权有效期,单位:秒。 |
warning-devs
参数 |
描述 |
name |
设备名称。 |
SN |
设备序列号。 |
module-name |
设备产品型号。 |
hardware-ver |
设备硬件版本号。 |
firmware-ver |
设备固件版本号。 |
dev-warning |
是否是警告设备。0:不是; 1:是。 |
is-online |
是否在线。 |
logs
参数 |
描述 |
id |
日志ID。 |
date |
日志产生时间,单位:秒。 |
info |
日志信息。 |
type |
日志类型。1:信息,2:警告,3:错误。 |
sn |
设备序列号。 |
响应示例
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"result": 0,
"status": {
"system-info": {
"date-time": 1634891748,
"cloud-version": "1.1.1"
},
"system-status": {
"cpu": [],
"mem": [],
"net-tx": [],
"net-rx": []
},
"app-settings": {
"is-https": 1,
"https-port": 443,
"is-cert-valid": 1,
"is-certkey-valid": 1,
"is-http": 1,
"http-port": 80,
"is-code": 0,
"code-value": "NULL"
},
"all-count": 18,
"warning-count": 13,
"pending-count": 0,
"online-count": 7,
"cur-convert-count": 7,
"cur-srt-count": 3,
"license-reg": {
"status": 0,
"user-name": "magewell-ltd",
"sn": "9C4E************F769",
"license": {
"max-dev-count": 100,
"max-convert-count": 3,
"max-srt-count": 2,
"limited-date": 1769904000
}
},
"cur-license": {
"max-dev-count": 100,
"max-convert-count": 3,
"max-srt-count": 2,
"limited-date": 1769904000
},
"warning-devs": [
{
"name": "Ultra Stream",
"SN": "xxx",
"module-name": "Ultra Stream SDI",
"hardware-ver": "A",
"firmware-ver": "1.0.0",
"dev-warning": 1,
"is-online": true
}
],
"dev-logs": [
{
"id": 3366,
"date": 1634891480,
"info": "Offline.",
"type": 2,
"sn": "xxx"
}
],
"sys-logs": []
}
}