• Native OpenStack API

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

List networks

Function Description

Query networks using search criteria and to display the networks in a list.

Interface Format

Method

URI

Description

GET

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

Queries all networks accessible to the tenant submitting the request.

Restrictions

N/A

Request Parameter

None

Response Parameter

Parameter

Type

Mandatory

Description

networks

List(network)

Yes

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

Request Example

GET /v2.0/networks

Response Example

{
    "networks": [
        {
            "status": "ACTIVE","availability_zone_hints": [],
"availability_zones": [],
            "subnets": [
                "ab78be2d-782f-42a5-aa72-35879f6890ff"
            ],
        "router:external": false,
        "shared": false,
            "port_security_enabled":true,
            "name": "testnet01",
            "admin_state_up": true,
            "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",            "id": "3d42a0d4-a980-4613-ae76-a2cddecff054",
        },
        {
            "status": "ACTIVE",
"availability_zone_hints": [],
"availability_zones": [],
            "subnets": [],
        "router:external": false,
        "shared": false,
            "port_security_enabled":true,
            "name": "demo-net",
            "admin_state_up": true,
            "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",

            "id": "60c809cb-6731-45d0-ace8-3bf5626421a9",
        },
        {
            "status": "ACTIVE",
"availability_zone_hints": [],
"availability_zones": [],
            "subnets": [
                "132dc12d-c02a-4c90-9cd5-c31669aace04"
            ],
        "router:external": false,
        "shared": false,
            "port_security_enabled":true,
            "name": "publicnet",
            "admin_state_up": true,
            "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
            "id": "9daeac7c-a98f-430f-8e38-67f9c044e299",
        }
    ]
}

Error Code

See section Return Code Processing.