Show Subnet Details
/v2.0/subnets/{subnet_id}Shows the details of a subnet with the specified ID.
Source: show-subnet-details
Request
Path parameters
subnet_idstringrequiredThe ID of the subnet.
Query parameters
fieldsstringFields to return. Can be specified multiple times, e.g. fields=id&fields=name. If omitted, all attributes allowed by policy are returned.
Example request
- cURL
- HTTP
curl -ks -H 'Content-Type: application/json' \
-H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:9696/v2.0/subnets/d3f93e1c-f59d-40f8-a46c-ea6285f3a069
GET https://api.vietnix.cloud:9696/v2.0/subnets/{subnet_id}
Response
Parameters
subnetobjectrequiredA subnet object.
idstringrequiredThe ID of the subnet.
tenant_idstringrequiredThe ID of the project.
project_idstringrequiredThe ID of the project.
namestringrequiredHuman-readable name of the resource.
enable_dhcpbooleanrequiredIndicates whether DHCP is enabled or disabled for the subnet.
network_idstringrequiredThe ID of the network to which the subnet belongs.
dns_nameserversarrayrequiredList of DNS name servers associated with the subnet.
allocation_poolsarrayrequiredAllocation pools with start and end IP addresses for this subnet.
host_routesarrayrequiredAdditional routes for the subnet. Each item has destination and nexthop.
ip_versionintegerrequiredThe IP protocol version. Value is 4 or 6.
gateway_ipstringrequiredGateway IP of this subnet, or null if no gateway is associated.
cidrstringrequiredThe CIDR of the subnet.
created_atstringrequiredThe date and time when the resource was created (ISO 8601).
descriptionstringrequiredA human-readable description for the subnet.
ipv6_address_modestringrequiredIPv6 address assignment mode: slaac, dhcpv6-stateful, dhcpv6-stateless, or null.
ipv6_ra_modestringrequiredIPv6 router advertisement mode: slaac, dhcpv6-stateful, dhcpv6-stateless, or null.
revision_numberintegerrequiredThe revision number of the subnet.
segment_idstringrequiredThe ID of a network segment the subnet is associated with.
subnetpool_idstringrequiredThe ID of the subnet pool associated with the subnet.
service_typesarrayrequiredThe service types associated with the subnet.
updated_atstringrequiredThe date and time when the resource was updated (ISO 8601) or null.
tagsarrayrequiredThe list of tags on the resource.
dns_publish_fixed_ipbooleanrequiredWhether to publish DNS records for IPs from this subnet.
Sample response
Response body
{
"subnet": {
"id": "d3f93e1c-f59d-40f8-a46c-ea6285f3a069",
"name": "",
"tenant_id": "f33507157a634f1cac71e06a70fb558e",
"network_id": "170546a1-a70a-40af-93e2-9261c7c05b77",
"ip_version": 4,
"subnetpool_id": null,
"enable_dhcp": true,
"ipv6_ra_mode": null,
"ipv6_address_mode": null,
"gateway_ip": "192.168.10.1",
"cidr": "192.168.10.0/24",
"allocation_pools": [
{
"start": "192.168.10.2",
"end": "192.168.10.254"
}
],
"host_routes": [],
"dns_nameservers": [
"10.30.0.27",
"10.30.0.28"
],
"description": "",
"service_types": [],
"tags": [],
"created_at": "2025-09-23T07:00:56Z",
"updated_at": "2025-09-23T07:00:56Z",
"revision_number": 0,
"project_id": "f33507157a634f1cac71e06a70fb558e"
}
}
Status codes
Success
| Status Code | Description |
|---|---|
| 200 - OK | Request was successful. |
Error
| Status Code | Description |
|---|---|
| 401 - Unauthorized | User must authenticate before making a request. |
| 404 - Not Found | The requested resource could not be found. |