List Virtual Routers
/v2.0/routersLists virtual routers that the project who submits the request can access.
Default policy settings return only those routers that the project who submits the request owns, unless an administrative user submits the request.
Request
Parameters
idstringFilter the list result by the ID of the router.
tenant_idstringFilter the list result by the ID of the project that owns the resource.
project_idstringFilter the list result by the ID of the project that owns the resource.
namestringFilter the list result by the human-readable name of the resource.
descriptionstringFilter the list result by the human-readable description of the resource.
admin_state_upbooleanFilter the list result by the administrative state of the resource, which is up (true) or down (false).
revision_numberintegerFilter the list result by the revision number of the resource.
sort_dirstringSort direction. A valid value is asc (ascending) or desc (descending). You can specify multiple pairs of sort key and sort direction query parameters.
sort_keystringSorts by a router attribute. You can specify multiple pairs of sort key and sort direction query parameters. The sort keys are limited to: admin_state_up, flavor_id, id, name, status, tenant_id, project_id
tagsstringA list of tags to filter the list result by. Resources that match all tags in this list will be returned. Tags in query must be separated by comma.
tags-anystringA list of tags to filter the list result by. Resources that match any tag in this list will be returned. Tags in query must be separated by comma.
not-tagsstringA list of tags to filter the list result by. Resources that match all tags in this list will be excluded. Tags in query must be separated by comma.
not-tags-anystringA list of tags to filter the list result by. Resources that match any tag in this list will be excluded. Tags in query must be separated by comma.
fieldsstringThe fields that you want the server to return. If no fields query parameter is specified, the networking API returns all attributes allowed by the policy settings. By using the fields parameter, the API returns only the requested set of attributes. The fields parameter can be specified multiple times. For example, if you specify fields=id&fields=name in the request URL, only the id and name attributes will be returned.
Sample Request
- cURL
- HTTP
curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:9696/v2.0/routers
GET https://api.vietnix.cloud:9696/v2.0/routers
Response
Response Parameters
routersarrayrequiredA list of router objects.
idstringrequiredThe ID of the router.
tenant_idstringrequiredThe ID of the project.
project_idstringrequiredThe ID of the project.
namestringrequiredHuman-readable name of the resource.
descriptionstringrequiredA human-readable description for the resource.
admin_state_upbooleanrequiredThe administrative state of the resource, which is up (true) or down (false).
statusstringrequiredThe router status.
external_gateway_infoobjectrequiredThe external gateway information of the router. If the router has an external gateway, this would be a dictionary of network_id, enable_snat and external_fixed_ips. Otherwise, this would be null.
network_idstringrequiredNetwork ID which the router gateway is connected to.
enable_snatbooleanrequiredEnable Source NAT (SNAT) attribute. true means Network Address Translation (NAT) is enabled for traffic generated by subnets attached to the router when the traffic is sent to/received from the external network. false means no NAT is applied for traffic from/to the external network. It is available when ext-gw-mode extension is enabled.
external_fixed_ipsarrayrequiredIP address(es) of the external gateway of the router. It is a list of IP addresses. Each element of the list is a dictionary of ip_address and subnet_id.
revision_numberintegerrequiredThe revision number of the resource.
routesarrayrequiredThe extra routes configuration for L3 router. A list of dictionaries with destination and nexthop parameters. It is available when extraroute extension is enabled.
destinationstringrequiredThe destination CIDR.
nexthopstringrequiredThe IP address of the next hop for the corresponding destination. The next hop IP address must be a part of one of the subnets to which the router interfaces are connected.
distributedbooleanrequiredtrue indicates a distributed router. It is available when dvr extension is enabled.
habooleanrequiredtrue indicates a highly-available router. It is available when l3-ha extension is enabled.
availability_zone_hintsarrayrequiredThe availability zone candidates for the router. It is available when router_availability_zone extension is enabled. The current version of Virtuozzo Hybrid Infrastructure does not support availability zones. The response returns the default availability zone or null.
availability_zonesarrayrequiredThe availability zone(s) for the router. It is available when router_availability_zone extension is enabled. The current version of Virtuozzo Hybrid Infrastructure does not support availability zones. The response returns the default availability zone or null.
service_type_idstringrequiredThe ID of the service type associated with the router.
flavor_idstringrequiredThe ID of the flavor associated with the router.
created_atstringrequiredThe date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm±hh. For example, 2015-08-27T09:49:58-05:00. The ±hh value, if included, is the time zone as an offset from UTC. In this example, the offset value is -05:00.
updated_atstringrequiredThe date and time when the resource was updated. If the resource has not been updated, this field will be null. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm±hh. For example, 2015-08-27T09:49:58-05:00. The ±hh value, if included, is the time zone as an offset from UTC. In this example, the offset value is -05:00.
tagsarrayrequiredThe list of tags on the router.
conntrack_helpersarrayrequiredThe associated conntrack helper resources for the router. If the router has multiple conntrack helper resources, this field has multiple entries. Each entry consists of netfilter conntrack helper (helper), the network protocol (protocol), the network port (port).
Sample Response
Response body
{
"routers": [
{
"id": "66fa6a3b-4b3a-485f-819d-c671765eb915",
"name": "R1",
"tenant_id": "f33507157a634f1cac71e06a70fb558e",
"admin_state_up": true,
"status": "ACTIVE",
"external_gateway_info": {
"network_id": "79cab11a-122d-43a7-9427-3575d9512413",
"external_fixed_ips": [
{
"subnet_id": "54ca4e27-7dfd-4504-a36b-8c47527f7a23",
"ip_address": "45.115.16.196"
}
],
"enable_snat": true
},
"description": "",
"availability_zones": [
"nova"
],
"availability_zone_hints": [],
"routes": [],
"flavor_id": null,
"tags": [],
"created_at": "2025-09-23T16:01:29Z",
"updated_at": "2025-09-23T16:01:34Z",
"revision_number": 11,
"project_id": "f33507157a634f1cac71e06a70fb558e"
},
{
"id": "7a5730df-f3e4-4054-8ea0-caa9eab08b61",
"name": "R3",
"tenant_id": "f33507157a634f1cac71e06a70fb558e",
"admin_state_up": true,
"status": "ACTIVE",
"external_gateway_info": {
"network_id": "79cab11a-122d-43a7-9427-3575d9512413",
"external_fixed_ips": [
{
"subnet_id": "54ca4e27-7dfd-4504-a36b-8c47527f7a23",
"ip_address": "45.115.16.221"
}
],
"enable_snat": true
},
"description": "",
"availability_zones": [
"nova"
],
"availability_zone_hints": [],
"routes": [],
"flavor_id": null,
"tags": [],
"created_at": "2025-09-24T01:59:30Z",
"updated_at": "2025-09-24T01:59:33Z",
"revision_number": 9,
"project_id": "f33507157a634f1cac71e06a70fb558e"
}
]
}
Status Code
Success
| Status Code | Description |
|---|---|
| 200 - OK | Request was successful. |
Error
| Status Code | Description |
|---|---|
| 401 - Unauthorized | User must authenticate before making a request. |