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​

subnet_idstringrequired

The ID of the subnet.

Query parameters​

fieldsstring

Fields 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 -ks -H 'Content-Type: application/json' \
-H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:9696/v2.0/subnets/d3f93e1c-f59d-40f8-a46c-ea6285f3a069

Response​

Parameters​

subnetobjectrequired

A subnet object.

idstringrequired

The ID of the subnet.

tenant_idstringrequired

The ID of the project.

project_idstringrequired

The ID of the project.

namestringrequired

Human-readable name of the resource.

enable_dhcpbooleanrequired

Indicates whether DHCP is enabled or disabled for the subnet.

network_idstringrequired

The ID of the network to which the subnet belongs.

dns_nameserversarrayrequired

List of DNS name servers associated with the subnet.

allocation_poolsarrayrequired

Allocation pools with start and end IP addresses for this subnet.

host_routesarrayrequired

Additional routes for the subnet. Each item has destination and nexthop.

ip_versionintegerrequired

The IP protocol version. Value is 4 or 6.

gateway_ipstringrequired

Gateway IP of this subnet, or null if no gateway is associated.

cidrstringrequired

The CIDR of the subnet.

created_atstringrequired

The date and time when the resource was created (ISO 8601).

descriptionstringrequired

A human-readable description for the subnet.

ipv6_address_modestringrequired

IPv6 address assignment mode: slaac, dhcpv6-stateful, dhcpv6-stateless, or null.

ipv6_ra_modestringrequired

IPv6 router advertisement mode: slaac, dhcpv6-stateful, dhcpv6-stateless, or null.

revision_numberintegerrequired

The revision number of the subnet.

segment_idstringrequired

The ID of a network segment the subnet is associated with.

subnetpool_idstringrequired

The ID of the subnet pool associated with the subnet.

service_typesarrayrequired

The service types associated with the subnet.

updated_atstringrequired

The date and time when the resource was updated (ISO 8601) or null.

tagsarrayrequired

The list of tags on the resource.

dns_publish_fixed_ipbooleanrequired

Whether 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 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.