{
"result": [
{
"data": [
{
"response": {
"build": 2795,
"http_method": "GET",
"name": "members",
"path": "virtual-wan",
"results": [
{
"link": "up",
"rx_bandwidth": 17698,
"rx_bytes": 10694535825,
"state_changed": 1753381417,
"tx_bandwidth": 19306,
"tx_bytes": 2152017150
},
The documentation has a little red asterisk next to Interface, but no mention why or what it means:
https://fndn.fortinet.net/index.php?/fortiapi/1-fortios/5140/1/virtual-wan/
Does anyone have any ideas how we can make the interface string appear please?
Solved! Go to Solution.
Sorry it took a while for the post to appear but meanwhile we've solved this:
Here is the explanation:
When we make calls to that endpoint we use a set of filter parameters to make the API only return the fields that we want (we try to be good API citizens and be as efficient as we can be making API calls).
With the older FortiOS API, the interface name is part of the JSON structure, so we didn't specify we wanted 'interface' back as part of the response, eg:
We send this:
"resource": "/api/v2/monitor/virtual-wan/members?format=link|rx_bandwidth|rx_bytes|state_changed|tx_bandwidth|tx_bytes",
..and we got back this:
},
"VPN2": {
"link": "up",
"rx_bandwidth": 5760,
"rx_bytes": 540113826,
"session": 4,
"state_changed": 1753254017,
"tx_bandwidth": 20668,
"tx_bytes": 1362208182
},
With the newer FortiOS version, the response has changed and the interface name has moved to the body of the response, because we weren't explicitly selecting 'interface' in our filter, we didn't get it back:
{
"link": "up",
"rx_bandwidth": 8507,
"rx_bytes": 10329308034,
"state_changed": 1752487770,
"tx_bandwidth": 3465,
"tx_bytes": 4164459580
},
...specify 'interface' in the filter, and...:
{
"interface": "WAN1",
"link": "up",
"rx_bandwidth": 9394,
"rx_bytes": 10329379660,
"state_changed": 1752487770,
"tx_bandwidth": 3767,
"tx_bytes": 4164494145
},
What a pain...
Hello Martin,
Thank you for using the Community Forum. I will seek to get you an answer or help. We will reply to this thread with an update as soon as possible.
Thanks,
Sorry it took a while for the post to appear but meanwhile we've solved this:
Here is the explanation:
When we make calls to that endpoint we use a set of filter parameters to make the API only return the fields that we want (we try to be good API citizens and be as efficient as we can be making API calls).
With the older FortiOS API, the interface name is part of the JSON structure, so we didn't specify we wanted 'interface' back as part of the response, eg:
We send this:
"resource": "/api/v2/monitor/virtual-wan/members?format=link|rx_bandwidth|rx_bytes|state_changed|tx_bandwidth|tx_bytes",
..and we got back this:
},
"VPN2": {
"link": "up",
"rx_bandwidth": 5760,
"rx_bytes": 540113826,
"session": 4,
"state_changed": 1753254017,
"tx_bandwidth": 20668,
"tx_bytes": 1362208182
},
With the newer FortiOS version, the response has changed and the interface name has moved to the body of the response, because we weren't explicitly selecting 'interface' in our filter, we didn't get it back:
{
"link": "up",
"rx_bandwidth": 8507,
"rx_bytes": 10329308034,
"state_changed": 1752487770,
"tx_bandwidth": 3465,
"tx_bytes": 4164459580
},
...specify 'interface' in the filter, and...:
{
"interface": "WAN1",
"link": "up",
"rx_bandwidth": 9394,
"rx_bytes": 10329379660,
"state_changed": 1752487770,
"tx_bandwidth": 3767,
"tx_bytes": 4164494145
},
What a pain...
Thank you for sharing the solution Martin :)
User | Count |
---|---|
2640 | |
1400 | |
810 | |
685 | |
455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.