Who Me Too'd this solution

Re: How to get all subnets within an IPv4 network container ?
Adviser
Posts: 181
This widget could not be displayed.
This widget could not be displayed.

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

 

View solution in original post

Who Me Too'd this solution