• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Subnets
  6. Show subnet

Show subnet

Function Description

This interface is used to query details about a subnet.

Interface Format

Method

URI

Description

GET

/v2.0/subnets/{subnet-id}

Queries details about the specified subnet.

Restrictions

N/A

Request Parameter

None

Response Parameter

Parameter

Type

Mandatory

Description

subnet

Dict

Yes

Specifies the subnet object. For details, see Table 1.

Request Example

GET /v2.0/subnets/e0fa7de1-a6e2-44c9-b052-b9d8cebe93c4

Response Example

{
    "subnet": {
        "name": "testsubnet",
        "enable_dhcp": true,
        "network_id": "60c809cb-6731-45d0-ace8-3bf5626421a9",
        "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
        "dns_nameservers": [
            "8.8.8.7",
            "8.8.8.8"
        ],
        "allocation_pools": [
            {
                "start": "10.0.10.2",
                "end": "10.0.10.254"
            }
        ],
        "host_routes": [],
        "ip_version": 4,
        "gateway_ip": "10.0.10.1",
        "cidr": "10.0.10.0/24",
        "id": "e0fa7de1-a6e2-44c9-b052-b9d8cebe93c4"
    }
}

Error Code

See section Return Code Processing.