Replies: 2 comments 3 replies
-
|
Hi @magarjoba You need to remove extra first '/' to uri = '/api/v2/cmdb/system/virtual-switch'replace by uri = 'api/v2/cmdb/system/virtual-switch'and it will work (and no really need to support before FortiOS 6.0.x :D) |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
Added on #280 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hi
I need to check interfaces.
The most reliable option, as practice has shown, is whether they are part of the virtual switch interface or the physical switch.
I checked the API manually, downloaded the results, selected the values for the function. But I can't get the function to work.
option: 1
https://{ip_fgt}/api/v2/cmdb/system/virtual-switch
#Suitable for revision (6.0.5 - v7.2.5) i tested
{ "http_method":"GET", "size":1, "matched_count":1, "next_idx":0, "revision":"8cc3a06d650301e96ab3572c6e938020", "results":[ { "name":"lan", "q_origin_key":"lan", "physical-switch":"sw0", "port":[ { "name":"a", "q_origin_key":"a", "alias":"" }, { "name":"lan2", "q_origin_key":"lan2", "alias":"" }, { "name":"lan3", "q_origin_key":"lan3", "alias":"" } ], "span":"disable", "span-source-port":"", "span-dest-port":"", "span-direction":"both" } ], "vdom":"root", "path":"system", "name":"virtual-switch", "status":"success", "http_status":200, "serial":"FGT40xxxxxxxx", "version":"v7.2.5", "build":1517 }option: 2
https://{ip_fgt}/api/v2/cmdb/system/switch-interface
#Suitable for olds revision (5.2.0- v5.2.15) i tested ))
{ "http_method":"GET", "results":[ { "name":"lan", "q_origin_key":"lan", "vdom":"root", "span-dest-port":"", "span-source-port":[ ], "member":[ { "interface-name":"internal1", "q_origin_key":"internal1" }, { "interface-name":"internal2", "q_origin_key":"internal2" }, { "interface-name":"internal3", "q_origin_key":"internal3" }, { "interface-name":"internal4", "q_origin_key":"internal4" }, { "interface-name":"internal5", "q_origin_key":"internal5" } ], "type":"switch", "span":"disable", "span-direction":"both" } ], "vdom":"root", "path":"system", "name":"switch-interface", "status":"success", "http_status":200, "serial":"FGTxxxxxxxx", "version":"v5.2.15", "build":766 }Why in this case the redesigned function does not work., please tell me what the problem is..!?
Beta Was this translation helpful? Give feedback.
All reactions