Ruijie Cloud API Document
Ruijie Cloud API Document
update time:2024-08-20
1 Overview
1.1 Purpose
This document describes the modes, processes, methods, and parameters used to
quickly connect third-party platforms to the RUIJIE CLOUD.
This document only provides definitions instead of implementation details of the APIs
used for connection between third-party platforms and the RUIJIE CLOUD.
1.2 Glossary
For example:
http://Serverip/service/api/maint/devices?access_token=A002B4E1E91747E0A1E56
9E2CB8EE07C
The below image is the request flow demo of creating NEW Voucher, help you
understand API request.
2 RUIJIE CLOUD APIs
URL [CloudUriPrefix]/service/api/oauth20/client/access_token?token=d6
3dss0a81e4415a889ac5b78fsc904a
Request POST
Method
Returned parameters:
Paramet Ty Manda Description
er Name pe tory
Request example:
POST
https://{{cloudserver}}/service/api/oauth20/client/access_token?token=d63dss0
a81e4415a889ac5b78fsc904a
--header "Content-Type: application/json"
--data "{
"appid": "Tartestxxxxx",
"secret": "Dartestxxxxx"
}"
{
"code": 0,
"msg": "OK.",
"accessToken": "jJVmxTfIVok7D0ol5z9Q6oCMkHJPEERl"
}
Request GET
Method
Returned parameters::
Request example:
Get
https://cloudServer.ruijienetworks.com/service/api/token/refresh?appid=xxx2&s
ecret=11xxxxx1&access\_token=C1EF2AE38BD04A5CB83D4D8CB5DF374E
{
"code": 0,
"msg": "OK.",
"accessToken": "C1EF2AE38BD04A5CB83D4D8CB5DF374E"
}
Descrip Get Network Group List, if your network group tree has
tion Location, Building and Sub-group, these group tree hierarchical
structure will be responsed
URL [CloudUrlPrefix]/service/api/group/single/tree?depth=BUILDING&acc
ess_token=JveZb3FJvRLiLZDog7B0oC5x9n6opWTr
Request GET
Method
Returned parameters:
{
"code": 0,
"msg": "OK.",
"groups": {
"name": "dumy",
"timezone": "Asia/Shanghai",
"groupId": 0,
"subGroups": [
{
"name": "ProjectSDDD",
"description": "",
"timezone": "Asia/Shanghai",
"groupId": 12480,
"createTime": "2017-12-26 14:21:26",
"type": "LOCATION",
"businessType": "MARKET",
"subGroups": [
{
"name": "HomeDDA",
"description": "",
"timezone": "PRC",
"groupId": 12482,
"createTime": "2017-12-26 14:21:55",
"type": "BUILDING",
"businessType": "UNCERTAIN",
"sceneEnum": "UNCERTAIN"
}
],
"sceneEnum": "COMMON"
},
{
"name": "Hotel225",
"description": "",
"timezone": "Asia/Shanghai",
"groupId": 12479,
"createTime": "2017-12-26 14:21:11",
"type": "LOCATION",
"businessType": "MARKET",
"subGroups": [
{
"name": "BeijingRoad001",
"description": "",
"timezone": "Asia/Shanghai",
"groupId": 12484,
"createTime": "2017-12-26 14:22:17",
"type": "LOCATION",
"businessType": "MARKET",
"subGroups": [],
"sceneEnum": "COMMON"
},
{
"name": "ZhongShan330",
"description": "",
"timezone": "Asia/Shanghai",
"groupId": 12485,
"createTime": "2017-12-26 14:22:28",
"type": "LOCATION",
"businessType": "MARKET",
"subGroups": [],
"sceneEnum": "COMMON"
}
],
"sceneEnum": "COMMON"
}
]
},
"rootGroupName": "dumy",
"rootGroupId": 0
}
URL [CloudUrlPrefix]/service/api/intl/usergroup/list/{group_Id}?pageIndex
={start}&pageSize={pageSize}&access_token={}
Request GET
Method
groupId Inte M Group ID, network group Id, get from API “Get
ger Network Group List”
pageSiz Int M Page Size for paging record items return, if u want
e to get all profiles, u can set start=0,
pageSize=1000 (if profiles num <1000).
Returned parameters::
data
id Int M UserGroup ID
GET
https://{{server}}/service/api/intl/usergroup/list/449441?pageIndex=0&pageSiz
e=20&access\_token=tGdm3muWyoT0oM5S9B6oTaKTOISnJV9p
{
"code": 0,
"msg": "OK.",
"data": [
{
"id": 18067,
"userGroupName": "StaffGroup",
"authProfileId": "30113648274480073538014045592098",
"createTime": 1662042491000,
"updateTime": 1662042491000,
"name": "StaffGroup",
"noOfDevice": 3,
"bindMac": 0,
"timePeriod": 30,
"quota": 100.0,
"downloadRateLimit": 0,
"uploadRateLimit": 0,
"packageType": "COMMON"
},
{
"id": 18066,
"userGroupName": "BossGroup",
"authProfileId": "23999504999216992345230097272894",
"createTime": 1662042483000,
"updateTime": 1662042506000,
"name": "BossGroup",
"noOfDevice": 3,
"bindMac": 0,
"timePeriod": 30,
"quota": 0.0,
"downloadRateLimit": 5120,
"uploadRateLimit": 5120,
"packageType": "COMMON"
}
],
"count": 2,
"maxAllowNum": 20
}
URL [CloudUrlPrefix]/service/api/intlSamVoucher/create/{tenantName}/{u
serName}/{groupId}?access_token={}
Request POST
Method
QueryParam parameters::
JsonParam parameters::
Parameter Ty Manda Description
Name pe tory
profile Str M Profile package UUID, get from API “2.3.1 Get
ing User Group List” of authprofileid field
userGroup int M User Group Id, get from API “2.3.1 Get User
Id Group List” of id field
Returned parameters::
list
URL [CloudUrlPrefix]/service/api/intlSamVoucher/create/{tenantName}/{us
erName}/{groupId}/{code}?access_token={}&tenantId={}
Reques POST
t
Method
groupId Str M Network Group ID, get from API “2.2.1 Get
ing Network Group List”
profile Str M Profile package UUID, get from API “2.3.1 Get
ing Voucher Package List”
Returned parameters::
{
"code": 0,
"msg": "OK.",
}
URL [CloudUrlPrefix]/service/api/intlSamVoucher/getList/{tenantName}/{g
roupId}?access_token={}&tenantId={}&start={}&pageSize={}
Request GET
Method
Returned parameters::
list
{
"code": 0,
"msg": "OK.",
"voucherData": {
"code": 0,
"msg": "OK.",
"count": 13,
"list": [
{
"uuid": "3c36bc35f3444394bc0fda39a3a62225",
"tenantId": "KeIHfvZpxsOBpLUdyBrBJZRTlQzhVYFT",
"voucherCode": "pgnazc",
"nameRef": "",
"timePeriod": 10080,
"usedTime": 0,
"createTime": 1531122413000,
"maxClients": 2,
"currentClients": 0,
"quota": 200,
"usedQuota": 0,
"status": "1",
"qrcodeUrl": "www.ruijienetworks.com",
"downloadRateLimit": 0,
"uploadRateLimit": 0,
"bindMac": 0,
"packageName": "7DayWiFi"
},
{
"uuid": "93a88786c5d44d8689fd634bf550ea11",
"tenantId": "KeIHfvZpxsOBpLUdyBrBJZRTlQzhVYFT",
"voucherCode": "h3mtkr",
"nameRef": "Room403 Chan Tai Man",
"timePeriod": 1440,
"usedTime": 0,
"createTime": 1531122313000,
"maxClients": 3,
"currentClients": 0,
"quota": 100,
"usedQuota": 0,
"status": "1",
"qrcodeUrl": "www.ruijienetworks.com",
"downloadRateLimit": 0,
"uploadRateLimit": 0,
"bindMac": 0,
"packageName": "1DayWiFi"
}
]
}
}
Request POST
Method
Returned parameters::
{
"code": 0,
"msg": "OK."
}
URL [CloudUrlPrefix]/service/api/samTransfer/account/delete/{groupId}?
access_token={}&tenantId={}&ishttps={}
Request POST
Method
Returned parameters::
{
"code": 0,
"msg": "OK."
}
URL [CloudUrlPrefix]/service/api/samTransfer/account/getList/{tenantNam
e}/{groupId}?access_token={}&tenantId={}&ishttps={}&start={}&page
Size={}&name={}&createBegin={}&createEnd={}
Reques GET
t
Method
createE Stri O
nd ng
createB Stri O
egin ng
{
"code": 0,
"msg": "OK.",
"count": 2,
"list": [
{
"uuid": "912e12380275461b9757ce9dd0ddd053",
"refName": "alias name",
"username": "test\_account\_name\_02",
"password": "123456",
"createTime": 1604307006000,
"expiryTime": null,
"logintime": null,
"groupId": "84ea43d8230042ea8855344e5c0a3f9f",
"tenantId": "ZxOKzqQmNrgNbCeHSHPllOUDqCoHSECZ",
"profileId": "14251152229359204590000804102161",
"profileName": "4233423",
"status": "1",
"quotalimit": 100,
"usedQuota": 0,
"maxUplink": 0,
"maxDownlink": 0,
"timePeriod": 30,
"currentClients": 0,
"maxClients": 3,
"usedTime": null
},
{
"uuid": "85e5270efca840e8bc9551cd9230650d",
"refName": "alias name",
"username": "test\_account\_name",
"password": "123456",
"createTime": 1604307001000,
"expiryTime": null,
"logintime": null,
"groupId": "84ea43d8230042ea8855344e5c0a3f9f",
"tenantId": "ZxOKzqQmNrgNbCeHSHPllOUDqCoHSECZ",
"profileId": "14251152229359204590000804102161",
"profileName": "4233423",
"status": "1",
"quotalimit": 100,
"usedQuota": 0,
"maxUplink": 0,
"maxDownlink": 0,
"timePeriod": 30,
"currentClients": 0,
"maxClients": 3,
"usedTime": null
}
]
}
URL [CloudUrlPrefix]/service/api/samTransfer/account/update?access_t
oken={}&tenantId={}&ishttps={}
Request POST
Method
Returned parameters::
{
"code": 0,
"msg": "OK."
}
URL [CloudUrlPrefix]/service/api/samTransfer/account/reset?access_to
ken={}&tenantId={}&ishttps={}
Request POST
Method
Returned parameters::
Parameter Ty Manda Description
Name pe tory
{
"code": 0,
"msg": "OK."
}
URL [CloudUrlPrefix]/service/api/samTransfer/account/getStatusSummary
/{tenantName}/{groupId}?access_token={}&tenantId={}&ishttps={}
Reques GET
t
Method
Returned parameters::
{
"code": 0,
"msg": "OK.",
"total": 2,
"used": 0,
"expired": 0
}
URL [CloudUrlPrefix]/logbizagent/logbiz/api/sta/sta_users?access_t
oken={}
Request POST
Method
groupI int M Network Group ID, get from API “2.2.1 Get Network
d Group List”
pageIn int M Begin index of the record, start with 0. For example,
dex PageSize=10, to get Second page, the start is
(2-1)*PageSize =10
Returned parameters:
{
"code": 0,
"msg": "OK.",
"list": [{
"activeTime": 5353000,
"band": "2.4G",
"buildingId": 9391115,
"buildingName": "GeneralDemo2",
"channel": "1",
"deviceAliasName": "Ruijie",
"downlinkRate": 8222548.0,
"floorNoise": -74,
"mac": "ff61.f313.0101",
"onlineTime": 1716804247000,
"pktLoseRate": 0,
"rssi": "-67",
"rssiInt": -67,
"score": 27,
"scoreReason": "heavy interference",
"sn": "NAHK0046H0008",
"ssid": "NAHK0046H0008",
"timeDelay": 64,
"updateTime": 1716809600376,
"uplinkRate": 1538630.0,
"userIp": "192.168.110.11",
"utilization": 28,
"wifiDown": 990833347,
"wifiUp": 998323450,
"wifiUpDown": 1989156797
}],
"count": 1
}
2.6 Device Management APIs
URL [CloudUrlPrefix]/service/api/maint/devices?access_token={
}
Returned parameters::
Get
https://Server.ruijienetworks.com/service/api/maint/devices?page=1&per\_page=
10&group\_id=57805&product\_type=AP&access\_token=x9oI0oP1E8b8r9J2oawukhdbU2i
GzqGk
{
"code": 0,
"msg": "OK.",
"deviceList": [
{
"serialNumber": "G1LQ68P016011",
"productClass": "AP720-I",
"productType": "AP",
"hardwareVersion": "1.00",
"softwareVersion": "AP\_RGOS 11.1(9)B1P19, Release(06200910)",
"onlineStatus": "ON",
"offlineReason": "INFORM",
"name": "",
"aliasName": "",
"groupId": 154845,
"groupName": "Binnykuoll",
"timezone": "Etc/GMT-8",
"parentGroupName": "[email protected]",
"remark": "",
"localIp": "192.168.110.60",
"cpeIp": "220.250.41.86",
"lastOnline": 1626838447000,
"createTime": 1623312353000,
"mac": "5869.6ce9.100e",
"confSyncType": "UP\_TO\_DATE",
"confSyncTypeDesc": "UP\_TO\_DATE",
"apModeChange": "IDLE",
"apMode": "FAT",
"devMode": "",
"commonType": "AP"
}, {
"serialNumber": "G1MQAWQ00077C",
"productClass": "RG-AP840-I",
"productType": "AP",
"hardwareVersion": "1.00",
"softwareVersion": "AP\_RGOS 11.9(6)B1, Release(07201411)",
"onlineStatus": "OFF",
"offlineReason": "INFORM",
"name": "Ruijie1618281901637",
"aliasName": "Ruijie1618281901637",
"groupId": 126115,
"groupName": "tests",
"timezone": "Asia/Shanghai",
"parentGroupName": "[email protected]",
"remark": "Ruijie\_Auto1618281901637",
"localIp": "192.168.110.195",
"cpeIp": "192.168.110.195",
"lastOnline": 1618295587000,
"createTime": 1617243656000,
"mac": "0074.9cbd.ac9e",
"confSyncType": "NOT\_SYNC",
"confSyncTypeDesc": "NOT\_SYNC",
"apModeChange": "IDLE",
"apMode": "FAT",
"devMode": "",
"commonType": "AP"
}
],
"totalCount": 2
}
URL [CloudUrlPrefix]/logbizagent/logbiz/api/flow/show/hour?access_
token={}
Request POST
Method
Returned parameters::
Paramet Ty Manda Description
er Name pe tory
code int M Response code. For details, see the section about
response code description.
list
{
"code": 0,
"msg": "OK.",
"count": 2,
"list": [
{
"buildingId": 58959,
"rxBytes": 297421,
"rxPkts": 1592,
"txBytes": 297964,
"txPkts": 1498,
"timeString": "2021-09-23 03:30:00",
"timeStamp": 1632339000000
},
{
"buildingId": 58959,
"rxBytes": 167569,
"rxPkts": 1307,
"txBytes": 202703,
"txPkts": 1166,
"timeString": "2021-09-23 03:40:00",
"timeStamp": 1632339600000,
"egRxBytes": 0,
"rxRate": 0.002,
"txRate": 0.003
} ]
}
}
Returned parameters::
{
"code": 0,
"msg": "OK.",
"groupId": 189279,
"localIp": "192.168.200.4",
"productClass": "EG205G-V2",
"productType": "EGW",
"softwareVersion": "ReyeeOS
1.53.1621;EG\_3.0(1)B11P53,Release(08162123)",
"onlineStatus": "ON",
"cpeUrl": "",
"hardwareVersion": "1.00",
"osType": "openwrt\_1.0",
"remark": "",
"mac": "00d0.f815.0843",
"serialNumber": "MACC942570020",
"name": "Gateway"
}
URL [CloudUrlPrefix]/service/api/gateway/intf/info/{sn}?access_tok
en={}
Request GET
Method
Returned parameters::
list
{
"code": 0,
"msg": "OK.",
"data": [
{
"alias": "Gi0/0",
"sn": "H1NA1WA000705",
"port": 0,
"intfType": "Gi",
"hwName": "",
"adminstatus": "true",
"protostatus": "true",
"linestatus": "true",
"description": "",
"ipAddr": "42.200.231.215",
"ipMask": "255.255.255.0",
"type": "WAN",
"nextHop": "42.200.231.254",
"mtu": 1500,
"bandwidth": 1000000,
"downband": 1000000,
"upband": 1000000,
"pppoe": "false",
"speed": "100M",
"mediumType": "copper",
"duplexMode": "Full",
"isSubintf": "false",
"updateTime": 1632468585000,
"ipType": "dhcp",
"province": "Fujian",
"city": "--",
"isp": "xxx",
"poeStatus": "Off",
"enableReversePath": true
},
{
"alias": "Gi0/2",
"sn": "H1NA1WA000705",
"port": 1,
"intfType": "Gi",
"hwName": "",
"adminstatus": "true",
"protostatus": "true",
"linestatus": "false",
"description": "",
"ipAddr": "192.168.110.1",
"iMask": "255.255.254.0",
"type": "LAN",
"mtu": 1500,
"pppoe": "false",
"isSubintf": "false",
"updateTime": 1632468585000,
"ipType": "none",
"layer2LineStatus": "false",
"layer2Name": "LAN 1",
"poeStatus": "Off",
"enableReversePath": false,
"dhcpInfo": {
"id": 44027,
"sn": "H1NA1WA000705",
"name": "ap\_dhcp\_pool",
"ipAddr": "192.168.110.0",
"startIp": "192.168.110.1",
"endIp": "192.168.111.254",
"subnetMask": "255.255.254.0",
"lease": "0 20 0",
"dnsServers": "8.8.8.8 8.8.4.4",
"defaultRouter": "192.168.110.1",
"status": "ENABLE",
"updateTime": 1619091269000,
"ipHelper": "",
"vlanId": "",
"excludedIps": "",
"option43": "3.3.33.3",
"option138": "3.3.33.3",
"ipNum": 510,
"maskLength": 23
}
},
{
"alias": "Gi0/2",
"sn": "H1NA1WA000705",
"port": 2,
"intfType": "Gi",
"hwName": "",
"adminstatus": "true",
"protostatus": "true",
"linestatus": "true",
"description": "",
"ipAddr": "192.168.110.1",
"ipMask": "255.255.254.0",
"type": "LAN",
"mtu": 1500,
"pppoe": "false",
"speed": "1000M",
"mediumType": "Copper",
"duplexMode": "Full",
"isSubintf": "false",
"updateTime": 1632468585000,
"ipType": "none",
"layer2DuplexMode": "Full",
"layer2LineStatus": "true",
"layer2MediumType": "Copper",
"layer2Name": "LAN 2",
"layer2Speed": "1000M",
"poeStatus": "On",
"enableReversePath": false,
"dhcpInfo": {
"id": 44027,
"sn": "H1NA1WA000705",
"name": "ap\_dhcp\_pool",
"ipAddr": "192.168.110.0",
"startIp": "192.168.110.1",
"endIp": "192.168.111.254",
"subnetMask": "255.255.254.0",
"lease": "0 20 0",
"dnsServers": "8.8.8.8 8.8.4.4",
"defaultRouter": "192.168.110.1",
"status": "ENABLE",
"updateTime": 1619091269000,
"ipHelper": "",
"vlanId": "",
"excludedIps": "",
"option43": "3.3.33.3",
"option138": "3.3.33.3",
"ipNum": 510,
"maskLength": 23
}
},
{
"alias": "Gi0/2",
"sn": "H1NA1WA000705",
"port": 3,
"intfType": "Gi",
"hwName": "",
"adminstatus": "true",
"protostatus": "true",
"lnestatus": "true",
"description": "",
"ipAddr": "192.168.110.1",
"ipMask": "255.255.254.0",
"type": "LAN",
"mtu": 1500,
"pppoe": "false",
"speed": "1000M",
"mediumType": "Copper",
"duplexMode": "Full",
"isSubintf": "false",
"updateTime": 1632468585000,
"ipType": "none",
"layer2DuplexMode": "Full",
"layer2LineStatus": "true",
"layer2MediumType": "Copper",
"layer2Name": "LAN 3",
"layer2Speed": "1000M",
"poeStatus": "On",
"enableReversePath": false,
"dhcpInfo": {
"id": 44027,
"sn": "H1NA1WA000705",
"name": "ap\_dhcp\_pool",
"ipAddr": "192.168.110.0",
"startIp": "192.168.110.1",
"endIp": "192.168.111.254",
"subnetMask": "255.255.254.0",
"lease": "0 20 0",
"dnsServers": "8.8.8.8 8.8.4.4",
"defaultRouter": "192.168.110.1",
"status": "ENABLE",
"updateTime": 1619091269000,
"ipHelper": "",
"vlanId": "",
"excludedIps": "",
"option43": "3.3.33.3",
"option138": "3.3.33.3",
"ipNum": 510,
"maskLength": 23
}
},
{
"alias": "Gi0/2",
"sn": "H1NA1WA000705",
"port": 4,
"intfType": "Gi",
"hwName": "",
"adminstatus": "true",
"protostatus": "true",
"linestatus": "true",
"description": "",
"ipAddr": "192.168.110.1",
"ipMask": "255.255.254.0",
"type": "LAN",
"mtu": 1500,
"pppoe": "false",
"speed": "1000M",
"mediumType": "Copper",
"duplexMode": "Full",
"isSubintf": "false",
"updateTime": 1632468585000,
"ipType": "none",
"layer2DuplexMode": "Full",
"layer2LineStatus": "true",
"layer2MediumType": "Copper",
"layer2Name": "LAN 4",
"layer2Speed": "1000M",
"poeStatus": "On",
"enableReversePath": false,
"dhcpInfo": {
"id": 44027,
"sn": "H1NA1WA000705",
"name": "ap\_dhcp\_pool",
"ipAddr": "192.168.110.0",
"startIp": "192.168.110.1",
"endIp": "192.168.111.254",
"subnetMask": "255.255.254.0",
"lease": "0 20 0",
"dnsServers": "8.8.8.8 8.8.4.4",
"defaultRouter": "192.168.110.1",
"status": "ENABLE",
"updateTime": 1619091269000,
"ipHelper": "",
"vlanId": "",
"excludedIps": "",
"option43": "3.3.33.3",
"option138": "3.3.33.3",
"ipNum": 510,
"maskLength": 23
}
},
{
"alias": "Gi0/2",
"sn": "H1NA1WA000705",
"port": 5,
"intfType": "Gi",
"hwName": "",
"adminstatus": "true",
"protostatus": "true",
"linestatus": "true",
"description": "",
"ipAddr": "192.168.110.1",
"ipMask": "255.255.254.0",
"type": "LAN",
"mtu": 1500,
"pppoe": "false",
"speed": "1000M",
"mediumType": "Copper",
"duplexMode": "Full",
"isSubintf": "false",
"updateTime": 1632468585000,
"ipType": "none",
"layer2DuplexMode": "Full",
"layer2LineStatus": "true",
"layer2MediumType": "Copper",
"layer2Name": "LAN 5",
"layer2Speed": "1000M",
"poeStatus": "On",
"enableReversePath": false,
"dhcpInfo": {
"id": 44027,
"sn": "H1NA1WA000705",
"name": "ap\_dhcp\_pool",
"ipAddr": "192.168.110.0",
"startIp": "192.168.110.1",
"endIp": "192.168.111.254",
"subnetMask": "255.255.254.0",
"lease": "0 20 0",
"dnsServers": "8.8.8.8 8.8.4.4",
"defaultRouter": "192.168.110.1",
"status": "ENABLE",
"updateTime": 1619091269000,
"ipHelper": "",
"vlanId": "",
"excludedIps": "",
"option43": "3.3.33.3",
"option138": "3.3.33.3",
"ipNum": 510,
"maskLength": 23
}
},
{
"alias": "Gi0/2",
"sn": "H1NA1WA000705",
"port": 6,
"intfType": "Gi",
"hwName": "",
"adminstatus": "true",
"protostatus": "true",
"linestatus": "false",
"description": "",
"ipAddr": "192.168.110.1",
"ipMask": "255.255.254.0",
"type": "LAN",
"mtu": 1500,
"pppoe": "false",
"isSubintf": "false",
"updateTime": 1632468585000,
"ipType": "none",
"layer2LineStatus": "false",
"layer2Name": "LAN 6",
"poeStatus": "Off",
"enableReversePath": false,
"dhcpInfo": {
"id": 44027,
"sn": "H1NA1WA000705",
"name": "ap\_dhcp\_pool",
"ipAddr": "192.168.110.0",
"startIp": "192.168.110.1",
"endIp": "192.168.111.254",
"subnetMask": "255.255.254.0",
"lease": "0 20 0",
"dnsServers": "8.8.8.8 8.8.4.4",
"defaultRouter": "192.168.110.1",
"status": "ENABLE",
"updateTime": 1619091269000,
"ipHelper": "",
"vlanId": "",
"excludedIps": "",
"option43": "3.3.33.3",
"option138": "3.3.33.3",
"ipNum": 510,
"maskLength": 23
}
},
{
"alias": "Gi0/2",
"sn": "H1NA1WA000705",
"port": 7,
"intfType": "Gi",
"hwName": "",
"adminstatus": "true",
"protostatus": "true",
"linestatus": "false",
"description": "",
"ipAddr": "192.168.110.1",
"ipMask": "255.255.254.0",
"type": "LAN",
"mtu": 1500,
"pppoe": "false",
"isSubintf": "false",
"updateTime": 1632468585000,
"ipType": "none",
"layer2LineStatus": "false",
"layer2Name": "LAN 7",
"poeStatus": "Off",
"enableReversePath": false,
"dhcpInfo": {
"id": 44027,
"sn": "H1NA1WA000705",
"name": "ap\_dhcp\_pool",
"ipAddr": "192.168.110.0",
"startIp": "192.168.110.1",
"endIp": "192.168.111.254",
"subnetMask": "255.255.254.0",
"lease": "0 20 0",
"dnsServers": "8.8.8.8 8.8.4.4",
"defaultRouter": "192.168.110.1",
"status": "ENABLE",
"updateTime": 1619091269000,
"ipHelper": "",
"vlanId": "",
"excludedIps": "",
"option43": "3.3.33.3",
"option138": "3.3.33.3",
"ipNum": 510,
"maskLength": 23
}
}
]
}
URL [CloudUrlPrefix]
/service/api/apmgt/apinfo/{sn}/devicemgtlogs?access_token={}
Request GET
Method
Returned parameters::
data
list
{
"code": 0,
"msg": "OK.",
"data": {
"count": 17,
"list": [
{
"id": 9,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67769,
"logType": "reboot",
"logDetail": "Device restart",
"operateTime": 1647829099000,
"accountId": 0
},
{
"id": 10,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67769,
"logType": "onoffline",
"logDetail": "Device online",
"operateTime": 1647829099000,
"accountId": 0
},
{
"id": 373,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67769,
"logType": "onoffline",
"logDetail": "Device offline. The final time when it sends
packets to Cloud is: 2022-03-19 05:00:07(It is an estimated value. The
deviation is 1 minute.)",
"operateTime": 1647644947000,
"accountId": 0
},
{
"id": 198,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67770,
"logType": "reboot",
"logDetail": "Device restart",
"operateTime": 1647327541000,
"accountId": 0
},
{
"id": 197,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67770,
"logType": "onoffline",
"logDetail": "Device online",
"operateTime": 1647327541000,
"accountId": 0
},
{
"id": 193,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67770,
"logType": "onoffline",
"logDetail": "Device offline. The final time when it sends
packets to Cloud is: 2022-03-15 12:35:07(It is an estimated value. The
deviation is 1 minute.)",
"operateTime": 1647326647000,
"accountId": 0
},
{
"id": 183,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67770,
"logType": "onoffline",
"logDetail": "Device online",
"operateTime": 1647325085000,
"accountId": 0
},
{
"id": 175,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67770,
"logType": "onoffline",
"logDetail": "Device offline. The final time when it sends
packets to Cloud is: 2022-03-15 12:04:07(It is an estimated value. The
deviation is 1 minute.)",
"operateTime": 1647324787000,
"accountId": 0
},
{
"id": 148,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67770,
"logType": "reboot",
"logDetail": "Device restart",
"operateTime": 1647247226000,
"accountId": 0
},
{
"id": 122,
"sn": "123494257001C",
"tenantId": 6128,
"groupId": 67770,
"logType": "reboot",
"logDetail": "Device restart",
"operateTime": 1647238109000,
"accountId": 0
}
]
}
}
URL [CloudUrlPrefix]
/logbizagent/logbiz/api/sys/current_performance?access_token=
{}
Request GET
Method
Returned parameters::
Parameter Ty Manda Description
Name pe tory
data
{
"code": 0,
"msg": "OK.",
"data": {
"cpuTemp": 0.0,
"cpuRate": 30.0,
"processNum": 179,
"memoryRate": 63.0,
"memoryFree": 114336,
"flashRate": 67.0,
"flashFree": 84892,
"diskRate": 0.0,
"diskFree": 0
}
}
Request GET
Method
Returned parameters::
list
{
"code": 0,
"msg": "OK.",
"portList": [
{
"sn": "NAEK322EH0002",
"port": 0,
"name": "Gi1",
"alias": "Gi1",
"isUplink": "true",
"description": "",
"enable": "true",
"type": "Access",
"vlan": 1,
"vlanList": "",
"untagVlan": "",
"status": "Up",
"speedConf": "Auto",
"speed": "1000M",
"mediumType": "Copper",
"supportMedium": "false",
"portGroupId": 8,
"duplexMode": "Auto",
"duplexModeCurrent": "Full",
"loopState": "false",
"updateTime": 1675604059000,
"switchPortEnable": "true",
"priIpAddrType": "NONE",
"order": 1,
"vsuOrder": 100000,
"devOrder": 1,
"slotOrder": 0,
"poeStatus": "Unsupport",
"productType": "MSW",
"productClass": "NBS3200-48GT4XS",
"enableConfig": true,
"uplink": true,
"aggregatePort": true
},
{
"sn": "NAEK322EH0002",
"port": 1,
"name": "Gi2",
"alias": "Gi2",
"description": "",
"enable": "true",
"type": "Access",
"vlan": 1,
"vlanList": "",
"untagVlan": "",
"status": "Up",
"speedConf": "Auto",
"speed": "1000M",
"mediumType": "Copper",
"supportMedium": "false",
"portGroupId": 8,
"duplexMode": "Auto",
"duplexModeCurrent": "Full",
"loopState": "false",
"updateTime": 1675604059000,
"switchPortEnable": "true",
"priIpAddrType": "NONE",
"order": 2,
"vsuOrder": 100000,
"devOrder": 1,
"slotOrder": 0,
"poeStatus": "Unsupport",
"productType": "MSW",
"productClass": "NBS3200-48GT4XS",
"enableConfig": true,
"uplink": false,
"aggregatePort": true
}
],
"totalCount": 52
}
URL [CloudUrlPrefix]/service/api/conf/switch/device/{sn}/poe/info
Returned parameters::
Parameter Typ Manda Description
Name e tory
data Obj
ect[]
{
"code": 0,
"msg": "OK.",
"data": [
{
"port": 0,
"sn": "NAEK29DFH0005",
"poeAdminStatus": "On",
"poeStatus": "On",
"powerUsed": "5.42 W"
},
{
"port": 1,
"sn": "NAEK29DFH0005",
"poeAdminStatus": "On",
"poeStatus": "On",
"powerUsed": "3.32 W"
}
],
"count": 2
}
URL [CloudUrlPrefix]/service/api/conf/switch/device/{sn}/poe/pwr
Returned parameters::
data Obj
ect
{
"code": 0,
"msg": "OK.",
"data": {
"sn": "NAEK29DFH0005",
"tenantId": 118458,
"groupId": 5805213,
"maxPower": "370.00 W",
"curPower": "16.20 W"
}
}
Request POST
Method
groupI Int M Account Root Group ID, all the network Groups
d under this Root Group ID. Create voucher API
not use this GroupId, Groups will be crated at
Ruijie Cloud UI, each group seen as each
network location. Network groups get from API
“2.2.1 Get Network Group List”
Returned parameters:
list
{
"code": 0,
"list": [
{
"appGroupName": "Other",
"appName": "TikTok",
"downFlow": 35970,
"upDownFlow": 99741,
"upFlow": 63771
},
{
"appGroupName": "Other",
"appName": "Other UDP",
"downFlow": 25130,
"upDownFlow": 83981,
"upFlow": 58851
}
],
"msg": "ok.",
"totalCount": 27
}
Appendix
code > 0: The service logic is not completed properly during API invocation. The
developer must handle the problem.
–50 ≤ code ≤ –1: API invocation does not pass authorization or verification and a
service exception occurs. The developer must handle the problem.
code < –50: An internal error occurs. Contact the RUIJIE CLOUD platform
management personnel.
1009 Login failed, Login fails. The cause is provided inside {}, which is
cause: {} not included in the message. For example:Login
failed, cause: incorrect password