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.
Parameter | Mandatory | Description |
---|---|---|
project_id | Yes | Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
Request
None
Response
Table 2 describes the response parameters.
Parameter | Mandatory | Type | Description |
---|---|---|---|
id | Yes | String | Specifies the network ID in UUID format. |
label | Yes | String | Specifies the network name. |
broadcast | Yes | String | The value can only be null. |
cidr | Yes | String | The value can only be null. |
cidr_v6 | Yes | String | The value can only be null. |
dns1 | Yes | String | The value can only be null. |
dns2 | Yes | String | The value can only be null. |
gateway | Yes | String | The value can only be null. |
gateway_v6 | Yes | String | The value can only be null. |
netmask | Yes | String | The value can only be null. |
netmask_v6 | Yes | String | The value can only be null. |
bridge | No | String | The value is fixed to be null and is in UUID format. |
Example Request
GET https://{endpoint}/v2.1/{project_id}/os-networks
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
- Function
- Constraints
- URI
- Request
- Response
- Example Request
- Example Response
- Returned Values