- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How to get the data which is the same as exporting from Infoblox GUI via REST API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-25-2015 10:51 PM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-10-2015 02:17 PM
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" }
]