API
Obtain Balance LAN Status
Avaliable in 7.1.0 or later
Input Parameters
Type | Notation | Mandatory | Description | |
infotype | Array | { profile, peer, tunnel } | optional | Choose the information which is wanted to obtain. |
lite | String | { yes, no } | optional | Limited data within the response will be get when this field set to “yes”. Otherwise, all status information will be got. |
tunnelOption | Array | list of <peer_id> | optional | Retrieve the tunnel information base on peer ID |
start | Number | <number> | optional | Start number of the peer |
size | Number | <number> | optional | Output size of the peer |
searchPattern | String | <string> | optional | Search peer by string if the field is not empty |
serialNumber | String | <sn> | optional | Search peer by serial number |
Return Parameters
Return JSON
Type | Notation | Description | |
peer | Array | list of <Peer_Obj> | Peer Information |
tunnel | Object | <Tunnel_Order_Obj> | tunnel Information, if tunnelOption is empty, the field will not appear. |
<Profile_Order_Obj>
Type | Notation | Description | |
order | Array | list of <profile_id> | Order of the profile ID |
<profile_id> | Object | <Profile_Obj> | Profile information by ID |
siteId | String | <string> | Local ID of the device |
<Profile_Obj>
Type | Notation | Description | |
name | String | <string> | PepVPN profile Name |
master | Boolean | <boolean> | State that is master profile |
vlanId | Number | <number> | VLAN ID of the profile. The field will not appear if lite=yes |
status | String | { START, AUTHEN, TUNNEL, ROUTE, CONFLICT, CONNECTED } | Status of the profile. The filed will not appear if lite=yes |
conflictCount | Number | <number> | Conflict count. The field will not appear if lite=yes |
peerCount | Number | <number> | Peer count. The field will not appear if lite=yes |
userShared | Boolean | <boolean> | Allow user shared. The field will not appear if lite=yes |
userCount | Number | <number> | User count. The field will not appear if lite=yes |
type | String | { l3, l2, nats, natc } | Type of the profile. The field will not appear if lite=yes |
<Peer_Obj>
Type | Notation | Description | |
serialNumber | String | <sn> | Serial number of the peer device |
status | String | { START, AUTHEN, TUNNEL, ROUTE, CONFLICT, CONNECTED } | Status of the peer |
name | String | <string> | peer device name |
profileId | Number | <number> | Profile ID of the peer connecting to |
secure | Boolean | <boolean> | State the connection is secured or not |
type | Striing | { l3, l2, nats, natc } | Type of profile peer connection |
username | String | <string> | Account username |
conflictRoute | Array | list of <cidr> | Conflict Route of the connection. The field will only appear in Layer3 connection |
inactiveRoute | Array | list of <cidr> | Inactive Route of the connection. The field will only appear in Layer3 connection |
route | Array | list of <cidr> | Route of the connection. The field will only appear in Layer3 connections |
server | String | <ipv4> | Server IP. The field will only appear in NAT connection |
client | String | <cidr> | Client IP with subnet mask. The field will only appear in NAT connections |
bridge | String | <ipv4> | IP of the bridge. The field will only appear in Layer2 connection |
vlanId | Number | <number> | VLAN ID. The field will only appear in Layer2 connection |
peerId | String | [<number><number>] | Unique ID of the peer |
<Tunnel_Order_Obj>
Type | Notation | Description | |
order | Array | list of <peer_id> | Order of the peer ID |
<peer_id> | Object | {<Tunnel_Obj>,<WAN_Order_Obj>} | Tunnel information by peer ID For fw8.1.0 or above, use <Tunnel_Obj>, Before fw8.1.0, use <WAN_Order_Obj> |
<Tunnel_Obj>
Type | Notation | Description | |
wan | Object | <WAN_Order_Obj> | Tunnel information by WAN |
overall | Object | <Overall_Obj> | Overall tunnel Statistic information |
<Overall_Obj>
Type | Notation | Description | |
time | Object | <Time_Obj> | Time information of the tunnel |
receiver | Object | <Receive_Obj> | Receive information For fw8.1.0 or later |
transmit | Object | <Transmit_Obj> | Transmit information For fw8.1.0 or later |
<WAN_Order_Obj>
Type | Notation | Description | |
order | Array | list of <conn_id> | Order of the WAN connection ID |
<conn_id> | Object | <WAN_Obj> | Tunnel Statistic information by WAN connection ID |
<WAn_Obj>
Type | Notation | Description | |
id | Number | <int> | WAN connection ID |
state | String | { INVALID, WAN_DOWN, WAN_DISABLED, DETECTING, FAILURE, REMOTE_FAILURE, COLD, STATNDBY, P- SUSPD, D-SUSPD, U- SUSPD, P-ACTIV, D- ACTIV, U-ACTIV, ACTIVE } | Status of the tunnel |
name | String | <string> | WAN name |
time | Object | <Time_Object> | Time information of the tunnel |
nanotime | Object | <Time_Object> | Time information of the tunnel |
rtt | Number | <number> | Round trip delay time of the remote peer WAN |
rx | Array | {list of <number><number>} | Receive bytes of the remote peer WAN For local tunnel information, this field is array. Otherwise this field is a number Depreciated in fw8.1.0 |
tx | Array | {list of <number><number>} | Transmit bytes of the remote peer WAN For local tunnel information, this field is array. Otherwise this field is a number Depreciated in fw8.1.0 |
loss | Array | {list of <number><number>} | Package loss of the remote peer WAN For local tunnel information, this field is array. Otherwise this field is a number Depreciated in fw8.1.0 |
receive | Object | <Receive_Obj> | Receive information For fw8.1.0 or later |
transmit | Object | <Transmit_Obj> | Transmit information For fw8.1.0 or later |
remote | Object | <WAN_Order_Obj> | Remote WAN tunnel status This field only appear in local tunnel information |
<Receive_Obj>
Type | Notation | Description | |
byte | Array | {list of <number><number>} | Receive bytes of the remote peer WAN For local tunnel information, this field is array. Otherwise this field is a number Absent for <Overall_Obj> |
packet | Object | <Receive_Packet_Obj> | Receive packet of the remote peer WAN |
<Transmit_Obj>
Type | Notation | Description | |
byte | Array | {list of <number>,<number>} | Transmit bytes of the remote peer WAN For local tunnel information, this field is array. Otherwise this field is a number Absent for <Overall_Obj> |
packet | Object | <Transmit_Packet_Obj> | Transmit packet of the remote peer WAN |
<Receive_Packet_Obj>
Absent for <Overall_Obj> | Type | Notation | Description |
wan | Array, Number | {list of <number>,<number>} | Receive wan packet For local tunnel information, this field is array. Otherwise this field is a number. Absent for <Overall_Obj> |
forward | Array, Number | {list of <number>,<number>} | Receive forward packet For local tunnel information, this field is array. Otherwise this field is a number. |
fragment | Array, Number | {list of <number>,<number>} | Receive fragment packet For local tunnel information, this field is array. Otherwise this field is a number. Absent for <Overall_Obj> |
loss | Array, Number | {list of <number>,<number>} | Receive loss packet For local tunnel information, this field is array. Otherwise this field is a number |
outOfOrder | Array, Number | {list of <number>,<number>} | Receive out of order packet For local tunnel information, this field is array. Otherwise this field is a number |
recover | Array, Number | {list of <number>,<number>} | Receive recover packet For local tunnel information, this field is array. Otherwise this field is a number. Absent for <Overall_Obj> |
discard | Array, Number | {list of <number>,<number>} | Receive discard packet For local tunnel information, this field is array. Otherwise this field is a number. Absent for <Overall_Obj> |
<Transmit_Packet_Obj>
Type | Notation | Description | |
wan | Array, Number | {list of <number>,<number>} | Transmit wan packet For local tunnel information, this field is array. Otherwise this field is a number. Absent for <Overall_Obj> |
forward | Array, Number | {list of <number>,<number>} | Transmit forward packet For local tunnel information, this field is array. Otherwise this field is a number |
fragment | Array, Number | {list of <number>,<number>} | Transmit fragment packet For local tunnel information, this field is array. Otherwise this field is a number. Absent for <Overall_Obj> |
loss | Array, Number | {list of <number>,<number>} | Transmit loss packet For local tunnel information, this field is array. Otherwise this field is a number. |
outOfOrder | Array, Number | {list of <number>,<number>} | Transmit out of order packet For local tunnel information, this field is array. Otherwise this field is a number. |
fec | Array, Number | {list of <number>,<number>} | Transmit forward error correct packet For local tunnel information, this field is array. Otherwise this field is a number. Absent for <Overall_Obj> |
redundant | Array, Number | {list of <number>,<number>} | Transmit redundant packet For local tunnel information, this field is array. Otherwise this field is a number. Absent for <Overall_Obj> |
<Time_Obj>
Type | Notation | Description | |
second | Number | <number> | Time in second |
nanoSecond | Number | <number> | Time in nano second |
cURL Example
curl -b cookies.txt http://192.168.1.1/api/status.pepvpn?infoType=profile peer&lite=yes&tunnelOption=1-1
{ "stat": "ok", "response": { "profile": { "1": { "name": "Next (1)", "master": true }, "2": { "name": "Next (2 - 2)", "master": true }, "siteId": "999", "order": [ 2, 1 ] }, "tunnel": { "1-1": { "wan": { "1": { "time": { "second": 1292258, "nanoSecond": 485618662 }, "rtt": 1, "rx": [ 1423988 ], "tx": [ 1334004 ], "loss": [ 0 ], "priority": 1, "state": "ACTIVE", "name": "WAN 1" }, "2": { "priority": 0, "state": "WAN_DOWN", "name": "WAN 2" }, "3": { "priority": 0, "state": "WAN_DISABLED", "name": "WAN 3" }, "4": { "priority": 0, "state": "WAN_DISABLED", "name": "WAN 4" }, "5": { "priority": 0, "state": "WAN_DISABLED", "name": "WAN 5" }, "6": { "priority": 0, "state": "WAN_DISABLED", "name": "Mobile Internet" }, "order": [ 1, 2, 3, 4, 5, 6 ] }, "overall": { "time": { "second": 1292258, "nanoSecond": 485618662 }, "receive": { "packet": { "forward": 32, "loss": 1, "outOfOrder": 0 } }, "transmit": { "packet": { "forward": 12, "loss": 0, "outOfOrder": 0 } } } }, "order": [ "1-1" ] }, "peer": [ { "serialNumber": "1825-4131-B4E7", "status": "CONNECTED", "name": "Ke-B580-x64-30", "profileId": 1, "secure": true, "type": "l3", "username": "dev30", "route": [ "192.168.30.0/24" ], "peerId": "1-1" } ] } }