Getting Virtual Networks
This section explains how to get a list of virtual networks.
Request
GET https://<hostname>/api/v1/cloudInfrastructure/virtualNetworks |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
None.
Request Body
None.
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 200 (OK).
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
Response Body
Property | Type | Description |
|---|---|---|
offset | integer | Shows the offset value. |
limit | integer | Shows the offset limit. |
totalCount | integer | Shows the number of records in the results array. |
results | Contains the result object. | |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Property | Type | Description |
|---|---|---|
id | string | Shows the identification number of the virtual network. |
name | string | Shows the name of the network. |
regionName | string | Shows the name of the region to which the network belongs. |
addressSpaces | string | Shows the address space of the virtual network. |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Example
Request: GET https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/virtualNetworks
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "offset": 0, "limit": 30, "totalCount": 229, "results": [ { "id": "/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/aamaltsev/providers/microsoft.network/virtualnetworks/vba_vnet-australiaeast-0", "name": "VBA_VNET-australiaeast-0", "regionName": "australiaeast", "addressSpaces": ["10.130.0.0/16"], "_links": { "subscription": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809"}, "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/virtualNetworks/%2Fsubscriptions%2F3a9a8330-7bbc-4b03-9c68-15d674fbc809%2Fresourcegroups%2Faamaltsev%2Fproviders%2Fmicrosoft.network%2Fvirtualnetworks%2Fvba_vnet-australiaeast-0"} } }, { "id": "/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/cpm-backup-martin/providers/microsoft.network/virtualnetworks/cpmbackupmartinvnet592", "name": "cpmbackupmartinvnet592", "regionName": "australiaeast", "addressSpaces": ["10.4.63.0/24"], "_links": { "subscription": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809"}, "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/virtualNetworks/%2Fsubscriptions%2F3a9a8330-7bbc-4b03-9c68-15d674fbc809%2Fresourcegroups%2Fcpm-backup-martin%2Fproviders%2Fmicrosoft.network%2Fvirtualnetworks%2Fcpmbackupmartinvnet592"} } } ], "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com:443/api/v1/cloudInfrastructure/virtualNetworks?offset=0&limit=30"}, "next": {"href": "https://abc.ukwest.cloudapp.azure.com:443/api/v1/cloudInfrastructure/virtualNetworks?offset=30&limit=30"} } } |