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

A Record Only with an EA

New Member
Posts: 5
3855     0


Just wondering if someone can please help me to create a A record in aparticular Zone and then Apply a specific EA to it.

 

At the moment i am just trying to do a Post:

wapi/v2.7/record:a -d '{"ipv4addr":"10.2.0.1","name":"xyz.com"}'/default

 

And i keep getting this Error;

 

"code": "Client.Ibap.Proto",
"text": "Unknown object type (record:a -d '{\"ipv4addr\":\"10.2.0.1\",\"name\":\"xyz.com\"}')"

me\":\"xyz.com\"}')"

Re: A Record Only with an EA

Moderator
Moderator
Posts: 289
3856     0

Here is an example using curl, to create a record with an EA value.  Note: the zone, and the EA defninition, must already exist.

 

curl -k1 -u admin:infoblox -X POST 'https://192.168.1.2/wapi/v2.7/record:a' -H "Content-Type: application/json" -d \
'{
  "ipv4addr":"10.2.0.1",
  "name":"host1.xyz.com",
  "view": "default",
  "extattrs":{"Organization":{"value":"Engineering"}}
}'

Re: A Record Only with an EA add func:nextavailableip

New Member
Posts: 1
3856     0

This curl works---I would love to know if we can add the getnextavailableIP function works. I keep getting errors on this curl:

curl -k -u xxxx:xxxx -X POST https://iblox.mkcorp.com/wapi/v2.2/record:a?_return_fields=ipv4addrs \

-H Content-Type:application/json \

-d '{
         "ipv4addrs": [{
         "ipv4addr": "func:nextavailableip:10.4.5.0/24",
         "configure_for_dhcp": false
         }],
     "name": "wapitest.mkcop.com",
     "configure_for_dns": true,
     "view": "default"
     }'

 

I get this error: Unknown argument/field: 'ipv4addrs'

--Tried every other possible scenario that I know of with errors...

 

I don't know if it's possible, but would also like to chain the create record:host and create record:a calls together...

Re: A Record Only with an EA add func:nextavailableip

Adviser
Posts: 181
3856     0

Hi,

 

You need to change your request to look like below.

curl -k -u xxxx:xxxx -X POST https://iblox.mkcorp.com/wapi/v2.2/record:a?_return_fields=ipv4addrs \

-H Content-Type:application/json \

-d '{
     "ipv4addr": "func:nextavailableip:10.4.5.0/24",
     "name": "wapitest.mkcop.com",
     "view": "default"
     }'
Showing results for 
Search instead for 
Did you mean: 

Recommended for You