Method | URI | Description |
---|---|---|
GET | /v2.0/networks | Lists networks to which the specified tenant has access. |
You can control which attributes are returned by using the fields query parameter. For information, see Filtering and Column Selection in the OpenStack Networking API v2.0 Reference.
Normal response codes: 200
Error response codes: unauthorized (401)
Example 3.1. List networks: JSON response
{ "networks":[ { "status":"ACTIVE", "subnets":[ "54d6f61d-db07-451c-9ab3-b9609b6b6f0b" ], "name":"private-network", "provider:physical_network":null, "admin_state_up":true, "tenant_id":"4fd44f30292945e481c7b8a0c8908869", "provider:network_type":"local", "router:external":true, "shared":true, "id":"d32019d3-bc6e-4319-9c1d-6722fc136a22", "provider:segmentation_id":null }, { "status":"ACTIVE", "subnets":[ "08eae331-0402-425a-923c-34f7cfe39c1b" ], "name":"private", "provider:physical_network":null, "admin_state_up":true, "tenant_id":"26a7980765d0414dbc1fc1f88cdb7e6e", "provider:network_type":"local", "router:external":true, "shared":true, "id":"db193ab3-96e3-4cb3-8fc5-05f4296d0324", "provider:segmentation_id":null } ] }
Example 3.2. List networks: XML response
<?xml version='1.0' encoding='UTF-8'?> <networks xmlns="http://openstack.org/quantum/api/v2.0" xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:router="http://docs.openstack.org/ext/neutron/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <network> <status>ACTIVE</status> <subnets> <subnet>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</subnet> </subnets> <name>private-network</name> <provider:physical_network xsi:nil="true"/> <admin_state_up quantum:type="bool">True</admin_state_up> <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id> <provider:network_type>local</provider:network_type> <router:external quantum:type="bool">True</router:external> <shared quantum:type="bool">True</shared> <id>d32019d3-bc6e-4319-9c1d-6722fc136a22</id> <provider:segmentation_id xsi:nil="true"/> </network> <network> <status>ACTIVE</status> <subnets> <subnet>08eae331-0402-425a-923c-34f7cfe39c1b</subnet> </subnets> <name>private</name> <provider:physical_network xsi:nil="true"/> <admin_state_up quantum:type="bool">True</admin_state_up> <tenant_id>26a7980765d0414dbc1fc1f88cdb7e6e</tenant_id> <provider:network_type>local</provider:network_type> <router:external quantum:type="bool">True</router:external> <shared quantum:type="bool">True</shared> <id>db193ab3-96e3-4cb3-8fc5-05f4296d0324</id> <provider:segmentation_id xsi:nil="true"/> </network> </networks>