API
Obtain the bandwidth allowance of the WAN connection or SIM
Avaliable in 8.0.0 or later
Input Parameters
Type | Notation | Mandatory | Description | |
connid | Array | <numlist> | optional | Connection ID In firmware 8.0.0, this field is mandatory and ONLY cellular WAN is allowed. API user needs to provide the ID to obtain the information. In firmware 8.0.1, this field is optional and allow any type of WAN when the field is absent, all WAN connection bandwidth allowance monitor information will be retrieved. |
Return Parameters
Return JSON
Type | Notation | Description | |
<conn_id> | Object | {<SIM_Allowance_obj>, <Allowance_Obj>} | In firmware 8.0.0, only cellular WAN is supported, It will return for the allowance monitor. In firmware 8.0.1 or later, all WAN type is supported, it will return if that is not cellular WAN. In firmware 8.0.1 or later, the output of Cellular WAN will same as firmware 8.0.0 |
order | Array | list of <conn_id> | WAN Connection ID order reference |
<SIM_Allowance_Obj>
Type | Notation | Description | |
<sim_id> | Object | <Allowance_Obj> | Allowance status |
order | Array | list of <sim_id> | SIM ID order reference |
<Allowance_Obj>
Type | Notation | Description | |
enable | Boolean | <boolean> | – |
usage | Number | <integer> | Data used in MB |
limit | Number | <integer> | |
percent | Number | [ 0, 100 ] | |
start | Number | [ 0, 28 ] | |
unit | Staring | { MB } |
cURL Example
curl -b cookies.txt http://192.168.1.1/api/status.wan.connection.allowance?connId=1
{ "stat": "ok", "response": { "1": { "1": { "enable": true, "usage": 5, "limit": 1024, "percent": 0, "start": 1, "unit": "MB" } }, "order": [ 1 ] } }