SonicOS-API 6.5 Geo-IP
Is there an issue with the /geo-ip endpoint?
I am able to get this endpoint to work as documented for 7.0 devices but cant seem to get it to work in 6.5 with documentation.
Using a TZ300 on SonicOS Enhanced 6.5.4.8-89n for testing but have looked at other models/firmware and seems to be the same.
If I try to follow the links to API documentation it takes me to 7.0 documentation but that doesn't work.
If I use an older firmware version in the URL I get the 6.5 documentation but the endpoint is not working as expected.
GET is not returning all fields listed.
Example of missing data:
- geo_ip/block/connections
- geo_ip/block/database_not_downloaded
PUT unable to set with body documented
{ "geo_ip": { "logging": true, "block": { "connections": { "all": true }, "countries": { "unknown": false }, "country": [ { "name": "Anonymous Proxy/Private IP" }, { "name": "Satellite Provider" } ] }, "custom_list": { "enable": true, "override_countries": true } } }
Am I just doing something wrong or is there an issue with this endpoint/documentation on 6.5 or this firmware version?
Answers
Hi @CTaylor,
I’ll take a deeper look tomorrow, but from a quick test on my end using a TZ 400 running 6.5.4.8, I am seeing those items you noted were missing in your firewall’s response data. That was the case until I disabled Geo-IP. From then on, I am missing some of the expected data in the response—even after re-enabling Geo-IP.
Hello @CTaylor,
Even after working with the firewall for a while and subsequently rebooting it, I couldn't get the API response to include the missing details. I was very confident I saw the details previously in the API response as I mentioned yesterday, but now I'm questioning my sanity 😃. I reported the behavior to our Engineering team.
Thanks!
Thank you for looking into this issue @Jaime. I anxiously await a resolution.
Hi @CTaylor,
Engineering addressed the issue and targeted the fix for an upcoming 6.5.4.x Maintenance Release.
Thanks.
Jaime
After updating to the 6.5.4.13-105n firmware I am not able to get all expected fields with a GET to
/geo-ip
I am still having issues with PUT. I am unable to enable\configure geo-ip settings. Getting a (400) Bad Request error.
Here is a sample of what I am PUT'n
PUT
https://<SONICWALL>/api/sonicos/geo-ip
After updating to the 6.5.4.13-105n firmware I am
notable to get all expected fields with a GET to /geo-ipSorry I AM able to get information from GET endpoint /geo-ip. Things look to be fixed with the GET but still having issues modifying settings.
Hi @CTaylor, can you confirm the JSON you received from the GET? I just want to make sure the JSON is complete. I'm not seeing any evidence that the fix made it into a release. I'm trying to get confirmation. Going with the assumption that the GET is incomplete, if you PUT back a modified version of what you GET, it would likely fail since the initial GET was incomplete. I'm booting 6.5.4.13 on my TZ 400 to try it out myself.
Just got a confirmation the fix is not in 6.5.4.13.
You are correct I was mistaken. Notes in code differed from what I posted.
I am still missing the information referenced.
Bellow is the info referenced.
We are almost a year from the original post should I assume a these 6.5 API issues are never making it to a maintenance release?
I still have hundreds of these 6.5 devices that I have to manage and they are all still under Software and Firmware support.
Do I just need to rely on cli commands to do a lot of these functions? I don't want to go back to cli hell ;(
Unfortunately, since the Gen6 API is technically not complete, the CLI is sometimes the only way to accomplish the task. The /direct/cli endpoint provides an entry for CLI commands over the API. I understand it isn't ideal, but it is a potential workaround that could help you accomplish the task in the short term. I've shared your comments and this thread for visibility.