Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

API & Integration, DevOps,NetOps,SecOps

Reply

Search multiple mac addresses for the fixedaddress object

Techie
Posts: 8
2378     0

Hi experts,

I also got another issue that I can't use a Request to search for multiple MAC addresses in one API call for the matched fixedaddresses. When I searched for one, it works fine

curl -X GET -k -H 'Authorization: Basic xxxxx=' -i 'https://1.2.3.4/wapi/v2.11/fixedaddress?mac=00:50:56:80:35:d0'

BTW, is there a way to search for a fixedaddress with the IP address?

When I tried with the multiple searches (with just one here for testing), I got error

curl -X POST -k -H 'Content-Type: application/json' -H 'Authorization: Basic xxxxx=' -i 'https://1.2.3.4/wapi/v2.11/request' --data '[{
"method": "GET",
"object": "fixedaddress",
"args": {"mac": "00:50:56:80:35:d0"}
}]'
{ "Error": "AdmConProtoError: The following argument(s) are unknown or not supported for multiple object body requests: set([u'mac'])", 
  "code": "Client.Ibap.Proto", 
  "text": "The following argument(s) are unknown or not supported for multiple object body requests: set([u'mac'])"
}

Is it that I missed something here, or is it not being supported? Thanks!

 

Re: Search multiple mac addresses for the fixedaddress object

Adviser
Posts: 179
2379     0

Hi,

 

Could you please try the following API call?

curl --location --request POST 'https://grid-master.demo.com/wapi/v2.10/request' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46aW5mb2Jsb3g=' \
--data-raw '[{"method":"GET",
"object": "fixedaddress",
"data": {"mac":"00:00:00:00:00:00"}}]
'

Regards,

Krishna Vasudevan

Re: Search multiple mac addresses for the fixedaddress object

Techie
Posts: 8
2379     0

Thank you, Krishna! I feel bad that I missed that myself lol

Re: Search multiple mac addresses for the fixedaddress object

Techie
Posts: 8
2379     0

Hi Krishna, hopefully, you don't mind an additional question. Is there a way to search for a "fixed address" object with the IP address, instead of the MAC address? Thanks!

Re: Search multiple mac addresses for the fixedaddress object

Adviser
Posts: 179
2379     0

Hi,

 

You could use this:

curl --location --request POST 'https://grid-master.demo.com/wapi/v2.10/request' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46aW5mb2Jsb3g=' \
--data-raw '[{"method":"GET",
"object": "fixedaddress",
"data": {"ipv4addr":"10.0.04"}}]
'

Regards,

Krishna

 

Re: Search multiple mac addresses for the fixedaddress object

Techie
Posts: 8
2379     0

Works great. Thank you Krishna!

Showing results for 
Search instead for 
Did you mean: 

Recommended for You