Chuyển tới nội dung chính

Show Virtual Router Details

GET /v2.0/routers/{router_id}

Shows details of a router with the specified ID.

Request

Parameters

NameInTypeDescription
router_idpathstringThe ID of the router.
fields (Optional)querystringThe fields that you want the server to return. If not specified, all attributes allowed by policy are returned. Can be specified multiple times, e.g. fields=id&fields=name.

Sample Request

Using curl

curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:9696/v2.0/routers/ce996632-45a2-4c6b-a951-a624eba74621

Using HTTP request

GET https://api.vietnix.cloud:9696/v2.0/routers/{router_id}
X-Auth-Token: gAAAAA<...>

Response

Response Parameters

NameInTypeDescription
routerbodyobjectA router object.
idbodystringThe ID of the router.
tenant_idbodystringThe ID of the project.
project_idbodystringThe ID of the project.
namebodystringHuman-readable name of the resource.
descriptionbodystringA human-readable description for the resource.
admin_state_upbodybooleanThe administrative state of the resource, which is up (true) or down (false).
statusbodystringThe router status.
external_gateway_infobodyobjectThe 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_idbodystringNetwork ID which the router gateway is connected to.
enable_snatbodybooleanEnable Source NAT (SNAT) attribute. true enables NAT for traffic to/from the external network; false disables it. Available when ext-gw-mode extension is enabled.
external_fixed_ipsbodyarrayIP address(es) of the external gateway of the router. Each element is a dictionary of ip_address and subnet_id.
revision_numberbodyintegerThe revision number of the resource.
routesbodyarrayExtra routes configuration for L3 router. A list of dictionaries with destination and nexthop. Available when extraroute extension is enabled.
destinationbodystringThe destination CIDR.
nexthopbodystringThe IP address of the next hop for the corresponding destination. Must belong to a subnet connected to the router.
distributedbodybooleantrue indicates a distributed router. Available when dvr extension is enabled.
habodybooleantrue indicates a highly-available router. Available when l3-ha extension is enabled.
availability_zone_hintsbodyarrayThe availability zone candidates for the router. Available when router_availability_zone is enabled. The current Virtuozzo Hybrid Infrastructure version does not support availability zones; default or null is returned.
availability_zonesbodyarrayThe availability zone(s) for the router. Available when router_availability_zone is enabled. The current Virtuozzo Hybrid Infrastructure version does not support availability zones; default or null is returned.
service_type_idbodystringThe ID of the service type associated with the router.
flavor_idbodystringThe ID of the flavor associated with the router.
created_atbodystringThe date and time when the resource was created. ISO 8601 format: CCYY-MM-DDThh:mm:ss±hh:mm.
updated_atbodystringThe date and time when the resource was updated, or null. ISO 8601 format.
tagsbodyarrayThe list of tags on the router.
conntrack_helpersbodyarrayAssociated conntrack helper resources. Each entry has helper, protocol, port.

Sample Response

{
"router": {
"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-24T05:07:13Z",
"revision_number": 13,
"project_id": "f33507157a634f1cac71e06a70fb558e"
}
}

Status Codes

Success

Status CodeDescription
200 - OKRequest was successful.

Error

Status CodeDescription
400 - Bad RequestSome content in the request was invalid.
401 - UnauthorizedUser must authenticate before making a request.
404 - Not FoundThe requested resource could not be found.
412 - Precondition FailedThe server did not meet a request precondition.