• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Network
  6. Querying Networks

Querying Networks

Function

This interface is used to query all networks accessible to the tenant submitting the request.

URI

GET /v2.0/networks

Example:

/v2.0/networks?id={network_id}&status={network_status}&name={network_name}&admin_state_up=${admin_state_up}&tenant_id={tenant_id}&shared={is_shared}&provider:network_type={geneve}

Request Message

None

Response Message

Table 1 Response parameter

Parameter

Type

Description

networks

List (network)

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

Example:

Example request

GET /v2.0/networks?limit=1

Example response

{
    "networks": [
        {
            "id": "0133cd73-34d4-4d4c-bf1f-e65b24603206",
            "name": "3804f26c-7862-43b6-ad3c-48445f42de89",
            "status": "ACTIVE",
            "shared": false,
            "subnets": [
                "423796f5-e02f-476f-bf02-2b88c8ddac8b"
            ],
            "availability_zone_hints": [],
            "availability_zones": [
                "az2.dc2",
                "az5.dc5"
            ],
            "admin_state_up": true,
            "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
            "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
            "provider:network_type": "vxlan",
            "router:external": false,
            "port_security_enabled": true,
            "created_at": "2018-03-23T03:51:58",
            "updated_at": "2018-03-23T03:51:58"
        }
    ]
}

Status Codes

For details, see section Status Codes.