- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
WAPI network export differs from GUI export
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2021 09:19 AM
I am attempting to export all networks using the WAPI to store the network information in an external database.
Without specifying a network view, the complete export results via WAPI contains 12295 records.
When exporting the networks from the GUI there are 13165 records.
Here is the query string I am using:
/wapi/v2.9.7/network?_return_type=xml-pretty&_max_results=100&_paging=1&_return_as_object=1&_return_fields%2b=network,total_hosts,comment,extattrs
The export from the GUI is from the IPAM tab.
Another strange thing is that the results from the WAPI include multiple network views and the GUI export only contains the 'default' view.
Anyone have any idea if I am using the correct WAPI endpoint and options ?
Re: WAPI network export differs from GUI export
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2021 09:35 AM
Your procedure looks fine I think.
In the GUI are you exporting from the IPAM tab or the DHCP tab? Exporting from the IPAM tab will give you networks and containers, which might account for the difference in results. Exporting from the DHCP tab will be just networks, more similar to the API export process.
Are you using the same account for both processes? You might also have limited access to some networks, if you're using an account with limited permissions.
Also note you can export by CSV, through API in case that method is preferred.
Re: WAPI network export differs from GUI export
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2021 10:47 AM
Thanks for the quick response Richard.
Using a different account (service account) to export with the WAPI than from the GUI.
Exporting from the DHCP tab returned 11762 records, less than the record count returned from the WAPI.
I'll look into the difference in account permissions.