• Native OpenStack API

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

Querying Networks

Function

This API is used to query the networks available to a tenant.

Constraints

You can query only the network ID and label (network name). Other fields are all null.

URI

GET /v2.1/{project_id}/os-networks

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

Request

N/A

Response

Response parameters

Table 2 describes the response parameters.
Table 2 Response parameters

Parameter

Type

Mandatory

Description

id

String

Yes

Specifies the network ID in UUID format.

label

String

Yes

Specifies the network name.

broadcast

String

Yes

The value can only be null.

cidr

String

Yes

The value can only be null.

cidr_v6

String

Yes

The value can only be null.

dns1

String

Yes

The value can only be null.

dns2

String

Yes

The value can only be null.

gateway

String

Yes

The value can only be null.

gateway_v6

String

Yes

The value can only be null.

netmask

String

Yes

The value can only be null.

netmask_v6

String

Yes

The value can only be null.

bridge

String

No

The value is fixed to be null and is in UUID format.

Examples

  • Example response
    {
        "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

See General Request Returned Values.