Skip to main content

Show Subnet Details

GET /v2.0/subnets/{subnet_id}

Shows the details of a subnet with the specified ID.

Request

Path parameters

NameTypeDescription
subnet_idstringThe ID of the subnet.

Query parameters

NameTypeDescription
fields (Optional)stringFields to return. Can be specified multiple times, e.g. fields=id&fields=name. If omitted, all attributes allowed by policy are returned.

Example request

Using curl

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

Using HTTP request

GET https://api.vietnix.cloud:9696/v2.0/subnets/{subnet_id}

Response

Parameters

NameTypeDescription
subnetobjectA subnet object.
idstringThe ID of the subnet.
tenant_idstringThe ID of the project.
project_idstringThe ID of the project.
namestringHuman-readable name of the resource.
enable_dhcpbooleanIndicates whether DHCP is enabled or disabled for the subnet.
network_idstringThe ID of the network to which the subnet belongs.
dns_nameserversarrayList of DNS name servers associated with the subnet.
allocation_poolsarrayAllocation pools with start and end IP addresses for this subnet.
host_routesarrayAdditional routes for the subnet. Each item has destination and nexthop.
ip_versionintegerThe IP protocol version. Value is 4 or 6.
gateway_ipstringGateway IP of this subnet, or null if no gateway is associated.
cidrstringThe CIDR of the subnet.
created_atstringThe date and time when the resource was created (ISO 8601).
descriptionstringA human-readable description for the subnet.
ipv6_address_modestringIPv6 address assignment mode: slaac, dhcpv6-stateful, dhcpv6-stateless, or null.
ipv6_ra_modestringIPv6 router advertisement mode: slaac, dhcpv6-stateful, dhcpv6-stateless, or null.
revision_numberintegerThe revision number of the subnet.
segment_idstringThe ID of a network segment the subnet is associated with.
subnetpool_idstringThe ID of the subnet pool associated with the subnet.
service_typesarrayThe service types associated with the subnet.
updated_atstringThe date and time when the resource was updated (ISO 8601) or null.
tagsarrayThe list of tags on the resource.
dns_publish_fixed_ipbooleanWhether to publish DNS records for IPs from this subnet.

Sample response

{
"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 CodeDescription
200 - OKRequest was successful.

Error

Status CodeDescription
401 - UnauthorizedUser must authenticate before making a request.
404 - Not FoundThe requested resource could not be found.