Reply
Highlighted

Using WAPI Structs

lleyton
Techie
Posts: 1
1054     0

Hey Y'all,

 

Can anybody share some example on how to use "structs" for a wapi call ? 

 

For eg, one of the structs from wapi doc is "nodeinfo", and when I try calling https://<ip>/wapi/v2.6/nodeinfo? , i'm getting unknown object type (nodeinfo) which i guess is because "nodeinfo" is not an object.

 

 

 

Re: Using WAPI Structs

Adviser
Posts: 92
1055     0

Structs are a structured variable, meaning that it's a complex variable with multiple attribute/value pairs.  Those attribute/value pairs could also be structs.

 

Instead of requesting a struct, you would request an object and ask for specific attributes (structs) of that object.  Some attributes are returned by default, some attributes need to be requested.

 

To return just one attribute, ask for just one attribute. (use "=")  To return one attribute and all the defaults, ask to also return that attribute (use "+=").

 

We can't use a plus "+" character in a URL, so we have to "escape" the character.  A plus sign is written as "%2b" in a url.

 

To display all appliances and their node_info, use this call:

 

https://<ip>/wapi/v2.6/member?_return_fields%2b=node_info

 

in curl:

 

curl -k1 -u admin:infoblox -X GET  'https://10.9.16.6/wapi/v2.6/member?_return_fields%2b=node_info'

 

 

Showing results for 
Search instead for 
Do you mean 

Recommended for You