Python API works on 7.0 but not on 6.5
I wrote a python Api to authenticate and get statuses from the firewall. Authentication works on all firewalls (i) 470 and 470W with 7.0 OS (ii) 400W with 6.5.4 OS.
But after authentication success, a GET on any APi end point (e.g. /reporting/wireless/status or /reporting/interfaces/ipv4/status) returns HTTP 406 error on the 400W with 6.5 OS. Any idea why or how to resolve this?
Best Answer
-
Jaime SonicWall Employee
Hi @HKI,
Please take a look at the 6.5.4.x SonicOS API YAML document here:
https://sonicos-api.sonicwall.com/sonicos_files/6.5.4.8-89n/TZ-400W/sonicos_openapi.ymlAccording to the document, /reporting/interfaces/ipv4/ is there, but /reporting/interfaces/ipv4/status is not.
You may be able to find a suitable endpoint using that document. I did a bit of searching, but have not located one. You may be able to use the /direct/cli endpoint on GEN6 to send an equivalent CLI command. Even with CLI commands, I am not finding a great equivalent command. The closest I've seen is "show interface X1 ip", which I don't think is what you are looking for.
1
Answers
I fixed the headers and found that some API end points work in Gen6 API with 6.5.4.x firmware e.g. /reporting/wireless/status.
Is there any equivalent of /reporting/interfaces/ipv4/status in Gen6 API Firmware?