• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. OpenStack Neutron APIs
  5. Subnet
  6. Querying a Subnet

Querying a Subnet

Function

This interface is used to query details about a subnet.

URI

GET /v2.0/subnets/{subnet_id}

Request Message

None

Response Message

Table 1 Response parameter

Parameter

Type

Description

subnet

Dict

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

Example:

Example request

GET /v2.0/subnets/011fc878-5521-4654-a1ad-f5b0b5820302

Example response

{
    "subnet": {
        "name": "kesmdemeet",
        "cidr": "172.16.236.0/24",
        "id": "011fc878-5521-4654-a1ad-f5b0b5820302",
        "enable_dhcp": true,
        "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "dns_nameservers": [],
        "allocation_pools": [
            {
                "start": "172.16.236.2",
                "end": "172.16.236.251"
            }
        ],
        "host_routes": [],
        "ip_version": 4,
        "gateway_ip": "172.16.236.1",
        "created_at": "2018-03-26T08:23:43",
        "updated_at": "2018-03-26T08:23:44"
    }
}

Status Codes

For details, see section Status Codes.