There are always situations where you have added many FQDN address objects to be used for exclusions and want the same address objects on other firewalls for similar exclusions. This KB explains how you can use SonicOS API to retrieve the FQDN address objects from a Generation 6 firewall and add them on a Gen 7 device running SonicOS 7.0 or SonicOSX 7.0.
TIP: The URL varies based on the type of the objects that you are adding or retrieving. Please refer https://sonicos-api.sonicwall.com for the entire list.
Â
In this example, we are going to retrieve the FQDN address objects from a TZ 500 running 6.5.4.6-79n reachable via IP: 192.168.188.100 on port TCP 444 and add those address objects on a TZ 670 running SonicOS 7.0 reachable via IP: 192.168.188.50 on port TCP 443.Â
NOTE: The same steps can be used for a GEN 7 device running SonicOSX 7.0. Also, if you already have the FQDN address objects in JSON format, scroll down to Part 2 of this KB and follow the steps required for GEN 7 device.
You would need to perform the following steps to retrieve the FQDN address objects from GEN 6 device:



TIP:Â You are free to choose Swagger, Postman, Git bash, or any application that allows API calls, if you are using a Linux based operating system you can execute cURL from the terminal. In this article, we are using Postman on Windows.
NOTE: https://192.168.188.100:444/-- Replace this with your SonicWall's Public or private IP address with the right management port number (If the management port is 443, you can directly use https:// followed by the IP address without the port number too).Â
Â
Â





Â
You would need to perform the following steps to add the FQDN address objects to GEN7 device:

NOTE: https://192.168.188.50/-- Replace this with your SonicWalls Public or private IP address with the right management port number (If the management port is 443, you can directly use https:// followed by the IP address without the port number too).
Â




NOTE:Â The HTTP POST method can also be used for this step.Â



You can manually log in to the firewall to check the changes made. Navigate to OBJECT | Match Objects | Addresses to check for the changes.
TIP:Â Postman offers another very good feature called as a global variable. You can save the URLs of the firewalls as global variables so that in case they change, all requests need not be re-written.



Â