GET https://[endpoint].ctapi.ctyun.cn/v1/api/connectionInfo
URI参数说明:
参数名 |
参数类型 |
是否必填 |
参数描述 |
prodInstId |
String |
是 |
实例ID |
clientId |
String |
是 |
设备ID |
返回参数说明:
参数名 |
参数类型 |
参数描述 |
statusCode |
Integer |
800-成功 其他失败 |
message |
String |
描述状态 |
returnObj |
Object |
返回对象 |
returnObj.connected_at |
String |
连接时间 |
returnObj.send_msg |
Integer |
发送消息数量 |
returnObj.disconnected_at |
String |
断开时间 |
returnObj.recv_msg |
Integer |
接收消息数量 |
returnObj.proto_name |
String |
协议名称 |
returnObj.connected |
Boolean |
是否在线 |
returnObj.username |
String |
用户名 |
returnObj.clean_start |
Boolean |
持久化会话 |
返回示例:(800)成功
{"statusCode": 800,"message": "success","returnObj": [{"connected_at": "2022-08-24 16:28:14","send_msg": 181,"subscriptions_cnt": 1,"disconnected_at": "2022-08-24 16:47:30","recv_msg": 0,"proto_name": "MQTT","connected": false,"username": "test","clean_start": false}]} |
{"statusCode": 800,"message": "success","returnObj": [{"connected_at": "2022-08-24 16:28:14","send_msg": 181,"subscriptions_cnt": 1,"disconnected_at": "2022-08-24 16:47:30","recv_msg": 0,"proto_name": "MQTT","connected": false,"username": "test","clean_start": false}]} |
返回示例:失败
{"returnObj": null,"message": "error","statusCode": "900"} |
{"returnObj": null,"message": "error","statusCode": "900"} |