- 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 all subnets within an IPv4 network container ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-09-2021 02:13 AM
Hi,
How to get all subnets within an IPv4 network container, with REST API ?
Regards,
Aurelien
Solved! Go to Solution.
Re: How to get all subnets within an IPv4 network container ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-09-2021 05:29 AM
Hi Aurelien,
You can filter the networks by their container like below:
API Call: https://<grid_ip>/wapi/v2.10/network?network_container=10.0.0.0/16&_return_fields%2B=network_container Sample Output: [ { "_ref": "network/ZG5zLm5ldHdvcmskMTAuMC4xMC4wLzI0LzA:10.0.10.0/24/Company%201", "comment": "Lab", "network": "10.0.10.0/24", "network_container": "10.0.0.0/16", "network_view": "Company 1" }, { "_ref": "network/ZG5zLm5ldHdvcmskMTAuMC4xLjAvMjQvMA:10.0.1.0/24/Company%201", "network": "10.0.1.0/24", "network_container": "10.0.0.0/16", "network_view": "Company 1" } ]
Hope this is helpful,
Krishna
Re: How to get all subnets within an IPv4 network container ?
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-10-2021 03:54 AM - edited 02-26-2021 01:31 AM
How to Get A Docker Container IP Address - Explained with Examples and run an application in a loosely isolated environment called a container.
mypennmedicine
Re: How to get all subnets within an IPv4 network container ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-12-2021 08:52 AM
Thanks Krishna.
Is there a way to get comment field of an IPv4 network container ?
Re: How to get all subnets within an IPv4 network container ?
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-14-2021 10:20 PM - edited 02-14-2021 10:21 PM
Hi,
You can add it to the list of _return_fields like below:
For network: https://<grid_ip>/wapi/v2.10/network?network_container=10.0.0.0/16&_return_fields%2B=network_container,comment For network container: https://<grid_ip>/wapi/v2.10/networkcontainer?_return_fields%2B=comment
Regards,
Krishna Vasudevan