Infoblox Exchange Cybersecurity Roadshow 2020 – Join us!
North America | Europe | Middle East/Africa | Asia-Pacific

API & Integration

Reply

Please help : Creating multiple IP records at one go

Authority
Posts: 30
381     0

Hi everyone,

 

I have a question. Is there any way by which i can create multiple IP records in infoblox using a single API call.

 

For example 

 

IP Address          Device name

---------------       ----------------

142.182.50.11     DMOKOO

142.182.50.14     DMOKO1

     :

     :

     :

 

14.182.50.23      DMOC23

 

Can I send the IP address and hostname in one single API call to be saved in Infoblox as different IP records?

 

Please help

Re: Please help : Creating multiple IP records at one go

MRichard Community Manager
Community Manager
Posts: 141
382     0

Yes you can do a "multiple body" request.  This example is for DHCP reservations:

 

curl -k1 -u admin:infoblox -X POST 'https://192.168.1.2/wapi/v2.8/request' -H "Content-Type: application/json" -d \
'[{
    "method":"POST",
    "object":"fixedaddress",
    "data": {
      "name": "host001",
      "comment": "This is a comment for Host 001",
      "mac": "00:00:00:00:00:00",
      "ipv4addr": "10.102.109.1"
    }
  },
  {
    "method":"POST",
    "object":"fixedaddress",
    "data": {
      "name": "host002",
      "comment": "This is a comment for Host 002",
      "mac": "00:00:00:00:00:00",
      "ipv4addr": "10.102.109.2"
    }
  },
  {
    "method":"POST",
    "object":"fixedaddress",
    "data": {
      "name": "host003",
      "comment": "This is a comment for Host 003",
      "mac": "00:00:00:00:00:00",
      "ipv4addr": "10.102.109.3"
    }
  }
]'

Re: Please help : Creating multiple IP records at one go

Authority
Posts: 30
382     0

Thanks Richard Smiley Happy

Re: Please help : Creating multiple IP records at one go

chris_dipaola
Techie
Posts: 4
382     0

By any chance, could you provide an example of this using Python "requests" module?

 

Thanks.

 

Chris.

Showing results for 
Search instead for 
Do you mean 

Recommended for You