• Native OpenStack API

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

List Networks

Function Description

This interface is used to query the network list.

Interface Format

Method

URI

Description

GET

/v2/{tenant_id}/os-networks

/v2.1/{tenant_id}/os-networks

Queries the network of a specified tenant.

This interface does not support pagination query.

Restrictions

Only the values of id and label can be queried. The values of other fields are all null.

This interface will become invalid from micro version 2.36. Since this version, the system will return error 404 when you invoke this interface. Using the corresponding network service interface is recommended.

Request Parameter

Parameter

Type

Mandatory

Description

tenant_id

UUID

Yes

Specifies the tenant ID, which is specified in the URI.

Response Parameter

Parameter

Type

Mandatory

Description

id

Uuid

Yes

Specifies the network ID.

label

String

Yes

Specifies the network name.

broadcast

String

Yes

The value is fixed to null.

cidr

String

Yes

The value is fixed to null.

cidr_v6

String

Yes

The value is fixed to null.

dns1

String

Yes

The value is fixed to null.

dns2

String

Yes

The value is fixed to null.

gateway

String

Yes

The value is fixed to null.

gateway_v6

String

Yes

The value is fixed to null.

netmask

String

Yes

The value is fixed to null.

netmask_v6

String

Yes

The value is fixed to null.

bridge

Uuid

No

The value is fixed to null.

Request Example

GET /v2/bb1118612ba64af3a6ea63a1bdcaa5ae/os-networks
GET /v2.1/bb1118612ba64af3a6ea63a1bdcaa5ae/os-networks

Response Example

{
    "networks": [
        {
            "id": "04468f37-500a-4a80-88da-af823e7a1d6c",
            "cidr_v6": null,
            "gateway": null,
            "label": "network_demo1",
            "broadcast": null,
            "netmask": null,
            "cidr": null,
            "dns2": null,
            "gateway_v6": null,
            "netmask_v6": null,
            "dns1": null
        },
        {
            "id": "1fcff959-21d0-4ba8-976a-974cb564c977",
            "cidr_v6": null,
            "gateway": null,
            "label": "network_demo2",
            "broadcast": null,
            "netmask": null,
            "cidr": null,
            "dns2": null,
            "gateway_v6": null,
            "netmask_v6": null,
            "dns1": null
        }
}

Returned Values

For details, see section General Request Returned Values.

Error Code

For details, see section Error Code Description.