• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. OpenStack Neutron APIs
  5. Router
  6. Querying a Router

Querying a Router

Function

This interface is used to query details about a router.

URI

GET /v2.0/routers/{router_id}

Request Message

None

Response Message

Table 1 Response parameter

Parameter

Type

Description

router

Dict

Specifies the router list. For details, see Table 1.

Example:

Example request

GET /v2.0/routers/01ab4be1-4447-45fb-94be-3ee787ed4ebe

Example response

{
    "router": {
        "id": "01ab4be1-4447-45fb-94be-3ee787ed4ebe",
        "name": "xiaoleizi-tag",
        "status": "ACTIVE",
        "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "admin_state_up": true,
        "external_gateway_info": {
            "network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975",
            "enable_snat": false
        },
        "routes": [
            {
                "destination": "0.0.0.0/0",
                "nexthop": "172.16.0.124"
            }
        ],
        "created_at": "2018-03-23T09:26:08",
        "updated_at": "2018-08-24T08:49:53"
    }
}

Status Codes

For details, see section Status Codes.