List subnets
Returns a list of subnets. Use the owned_by query parameter to control which subnets are returned: project (default) returns only subnets owned by the project, any returns all subnets from networks available to the project.
Path parameters
Project ID
Project ID
Region ID
Region ID
Query parameters
Optional. Limit the number of returned items
Optional. Limit the number of returned items
Only list subnets of this network
Only list subnets of this network
Optional. Offset value is used to exclude the first set of records from the result
Optional. Offset value is used to exclude the first set of records from the result
Ordering subnets list result by name, created_at, updated_at, available_ips, total_ips, and cidr (default) fields of the subnet and directions (name.asc).
Controls which subnets are returned. 'project' (default) returns only subnets owned by the project. 'any' returns all subnets from networks available to the project, including subnets from shared networks.
Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
[ "key1", "key2" ]
Optional. Filter by tag key-value pairs.
Optional. Filter by tag key-value pairs.
Response
OK
Example response
{
"count": 1,
"results": [
{
"available_ips": 250,
"cidr": "192.168.13.0/24",
"created_at": "2019-06-13T13:58:12+0000",
"creator_task_id": "5cc890da-d031-4a23-ac31-625edfa22812",
"dns_nameservers": [
"8.8.8.8",
"8.8.4.4"
],
"enable_dhcp": true,
"gateway_ip": "192.168.13.1",
"host_routes": [],
"id": "b39792c3-3160-4356-912e-ba396c95cdcf",
"name": "subnet_3",
"network_id": "b30d0de7-bca2-4c83-9c57-9e645bd2cc92",
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"total_ips": 253,
"updated_at": "2019-06-13T13:58:12+0000"
}
]
}