Show Subnet Details
GET /v2.0/subnets/{subnet_id}
Shows the details of a subnet with the specified ID.
info
Source: show-subnet-details
Request
Path parameters
| Name | Type | Description |
|---|---|---|
subnet_id | string | The ID of the subnet. |
Query parameters
| Name | Type | Description |
|---|---|---|
fields (Optional) | string | 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
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
| Name | Type | Description |
|---|---|---|
subnet | object | A subnet object. |
id | string | The ID of the subnet. |
tenant_id | string | The ID of the project. |
project_id | string | The ID of the project. |
name | string | Human-readable name of the resource. |
enable_dhcp | boolean | Indicates whether DHCP is enabled or disabled for the subnet. |
network_id | string | The ID of the network to which the subnet belongs. |
dns_nameservers | array | List of DNS name servers associated with the subnet. |
allocation_pools | array | Allocation pools with start and end IP addresses for this subnet. |
host_routes | array | Additional routes for the subnet. Each item has destination and nexthop. |
ip_version | integer | The IP protocol version. Value is 4 or 6. |
gateway_ip | string | Gateway IP of this subnet, or null if no gateway is associated. |
cidr | string | The CIDR of the subnet. |
created_at | string | The date and time when the resource was created (ISO 8601). |
description | string | A human-readable description for the subnet. |
ipv6_address_mode | string | IPv6 address assignment mode: slaac, dhcpv6-stateful, dhcpv6-stateless, or null. |
ipv6_ra_mode | string | IPv6 router advertisement mode: slaac, dhcpv6-stateful, dhcpv6-stateless, or null. |
revision_number | integer | The revision number of the subnet. |
segment_id | string | The ID of a network segment the subnet is associated with. |
subnetpool_id | string | The ID of the subnet pool associated with the subnet. |
service_types | array | The service types associated with the subnet. |
updated_at | string | The date and time when the resource was updated (ISO 8601) or null. |
tags | array | The list of tags on the resource. |
dns_publish_fixed_ip | boolean | Whether 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 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. |