Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps

Reply

Add bulk of subnets via single API call

Techie
Posts: 9
3214     1

Hi,

 

is there a way to add bulk of subnets via single API call? I do not want to use an external file and use an API to call this file. Is there anything else that i can do?

 

Re: Add bulk of subnets via single API call

Adviser
Posts: 181
3214     1

Hi,

 

If you do not want to use the import CSV file option, you can use the request object to make multiple API calls.

curl -k -u admin:Infoblox -H 'content-type:application/json' -X POST "https://127.0.0.1/wapi/v2.10/request" 
-d '[{"method": "POST",
       "object": "network",
       "data": {"network": "10.10.10.0/24"}},
      {"method": "POST",
       "object": "network",
       "data": {"network": "10.10.20.0/24"}},
      {"method": "POST",
       "object": "network",
       "data": {"network": "10.10.30.0/24"}}]'

You will get an output like below.

[
    "network/ZG5zLm5ldHdvcmskMTAuMTAuMTAuMC8yNC8w:10.10.10.0/24/default",
    "network/ZG5zLm5ldHdvcmskMTAuMTAuMjAuMC8yNC8w:10.10.20.0/24/default",
    "network/ZG5zLm5ldHdvcmskMTAuMTAuMzAuMC8yNC8w:10.10.30.0/24/default"
]

Regards,

Krishna Vasudevan

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You