Verb | URI | Description |
GET | /subnets | Lists all subnets that are accessible to the tenant who submits the request. |
Normal Response Code: 200
Error Response Codes: Unauthorized (401)
This operation returns a list of subnets objects the tenant has access to. Default policy settings returns exclusively subnets owned by the tenant submitting the request, unless the request is submitted by an user with administrative rights. You can control which attributes are returned by using the fields query parameter. You can filter results by using query string parameters. See the section called “Filtering and Column Selection”.
This operation does not require a request body.
This operation returns a response body.
Example 4.16. List Subnets: JSON Response
{ "subnets": [ { "allocation_pools": [ { "end": "10.0.3.254", "start": "10.0.3.2" } ], "cidr": "10.0.3.0/24", "dns_nameservers": [], "enable_dhcp": true, "gateway_ip": "10.0.3.1", "host_routes": [], "id": "91e47a57-7508-46fe-afc9-fc454e8580e1", "ip_version": 4, "name": "", "network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363", "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" }, { "allocation_pools": [ { "end": "10.0.2.254", "start": "10.0.2.2" } ], "cidr": "10.0.2.0/24", "dns_nameservers": [], "enable_dhcp": true, "gateway_ip": "10.0.2.1", "host_routes": [], "id": "e3c3620c-9d24-4470-b226-739da2f617c0", "ip_version": 4, "name": "", "network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363", "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce" } ] }