Reply
Highlighted

How to get the data which is the same as exporting from Infoblox GUI via REST API

kzhu_1
Techie
Posts: 8
2540     0

Hi 

   I could extract data from Infoblox GUI as "Export Visible Data" like below:

Network

           Comment

                    IPAM Utilization

    Site     

VLAN

    Country

    Region

     State

10.20.X.X/16

    Corp Test Office

         0.00%

                       AZ

                     

USA

 

                         Arizona

 

But How could I get data like this especially get the "Site","Country","State" via REST API? (By the way why it only supoort version 1.4 when I use Infoblox API?)

 

Rergards

 

 

Re: How to get the data which is the same as exporting from Infoblox GUI via REST API

Authority
Posts: 18
2541     0

Hi kzhu_1, you can control which fields you receive in a GET REST API call by using the _return_fields option.

 

Also, the REST API has a different versioning scheme which has been detached from the NIOS release version. This means a given release of NIOS will be backwards compatible with previous WAPI versions unless otherwise noted in the release notes. In other words, REST API scripts don't need to change if the NIOS version changes!

 

This is a sample URL of how to get a list of networks, with their address and extensible attributes:

 

https://[GridMaster-IP]/wapi/v1.4/network?network_container=10.0.0.0/8&_return_type=json-pretty&_max_results=10000&_return_fields=network,extattrs

 

And this is a real, truncated response:

 

[
    {
        "_ref": "network/ZG5zLm5ldHdvcmskMTAuNDEuMC4wLzE2LzA:10.41.0.0/16/Company%201", 
        "extattrs": {
            "Country": {
                "value": "Switzerland"
            }, 
            "Region": {
                "value": "EMEA"
            }
        }, 
        "network": "10.41.0.0/16"
    }, 
    {
        "_ref": "network/ZG5zLm5ldHdvcmskMTAuOTEuMC4wLzE2LzA:10.91.0.0/16/Company%201", 
        "extattrs": {
            "Country": {
                "value": "India"
            }, 
            "Region": {
                "value": "APAC"
            }, 
            "Usage": {
                "value": "LAN"
            }
        }, 
        "network": "10.91.0.0/16"
    }, 
    {
        "_ref": "network/ZG5zLm5ldHdvcmskMTAuMTQ4LjAuMC8xNC8w:10.148.0.0/14/Company%201", 
        "extattrs": {}, 
        "network": "10.148.0.0/14"
    }, 
    {
        "_ref": "network/ZG5zLm5ldHdvcmskMTAuOTUuMC4wLzI4LzA:10.95.0.0/28/Company%201", 
        "extattrs": {}, 
        "network": "10.95.0.0/28"
    }
]

 

Showing results for 
Search instead for 
Do you mean 

Recommended for You