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

API Search regex for integer extensible attribute

Member
Posts: 1
1119     1

Hi guys,

 

i am trying to get a list of all networks that have VLAN ID to determine which VLAN ID would be next. However I am not able to build a valid regex with an integer.

 

A normal query for a VLAN gives me this output, so you can see the structure:

/wapi/v2.9.5/network?_return_fields=comment,network,extattrs&*VLAN%20ID=1

 

<list>
  <value type="object">
    <comment>some network</comment>
    <network>X.X.X.X/24</network>
    <extattrs type="object">
       <tag0 name="VLAN ID" type="object">
         <value type="int">1</value>
       </tag0>
     </extattrs>
    <_ref>network/ZG5zLm5ldHdvcmskMTAuMjUwLjAuMC8yNC8w:X.X.X.X/24/default</_ref>
  </value>
</list>
 
There are many networks that doen have a VLAN ID. So I just want to query all networks which have one.
I tried:
/wapi/v2.9.5/network?_return_fields=comment,network,extattrs&*VLAN%20ID>0
/wapi/v2.9.5/network?_return_fields=comment,network,extattrs&*VLAN%20ID=.*
/wapi/v2.9.5/network?_return_fields=comment,network,extattrs&*VLAN%20ID=*
/wapi/v2.9.5/network?_return_fields=comment,network,extattrs&*VLAN%20ID~.*
/wapi/v2.9.5/network?_return_fields=comment,network,extattrs&*VLAN%20ID!=0
/wapi/v2.9.5/network?_return_fields=comment,network,extattrs&*VLAN%20ID=""
and some other things but nothing works.
 
Is there any regex to get the wanted result from the api?
 
Further note:
If I do not use a = symbol the api will interprete it as part of the name the ea has. 
I.e.:/wapi/v2.9.5/network?_return_fields=comment,network,extattrs&*VLAN%20ID>0
{ "Error": "AdmConProtoError: Unknown extensible attribute: VLAN ID>0", 
  "code": "Client.Ibap.Proto", 
  "text": "Unknown extensible attribute: VLAN ID>0"
}
Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin