Security

Reply
Highlighted

API call to return gateway and mask info?

RLisiecki
Techie
Posts: 2
2855     0

We would like to display the mask and gateway when the IP is returned. Is there a specific call or do we have to add this info as attributes?Thank-you,ray

Re: API call to return

Adviser
Posts: 195
2856     0

You need the check the network that contains the IP address and look there for the mask and gateway settings.

 

Re: API call to return

PLussier
Techie
Posts: 9
2856     0
Hi,I have the same question. I need to determine what the assigned gateway is for agiven network, but I can't find the API call to determine that.When I look at the WebUI, I can find it by editing the network in question and can see it under under IPv4 DHCP Options. But I can't seem to figure out the correct API call to get at that information using the WAPI. Querying the network itself just gives me this:curl -K3 -u test:test -X https://192.168.10.5/wapi/1.2/network/abcdefghijklmnopqrstuvwxyz0123456789:192.168.10.0/24/default{ "_ref": "network/abcdefghijklmnopqrstuvwxyz0123456789:192.168.10.0/24/default", "comment": "vlan 10", "network": "192.168.10.0/24", "network_view": "default"}So, how do I get at the gateway, or router for that that network ?Thanks,Paul

aRe: API call to return

harirajan
Techie
Posts: 14
2856     0

It will be a great help to us , if you can provide rest api query to get the subnet mask and gateway of the given subnet from infoblox

Re: aRe: API call to return

ADecroix
Techie
Posts: 9
2856     0

Below the request to retrieve the gateway information (and all other DHCP options) and the netmask for a given network

 

curl -k -u admin:password -X GET https://GM_IP/wapi/v2.7/network?ipv4addr=192.168.1.0&_return_fields=options,netmask
Showing results for 
Search instead for 
Do you mean 

Recommended for You