Querying a Router
Function
This API is used to query details about a router.
URI
GET /v2.0/routers/{router_id}
Request Parameters
None
Example Request
GET https://{Endpoint}/v2.0/routers/01ab4be1-4447-45fb-94be-3ee787ed4ebe
Response Parameters
Parameter |
Type |
Description |
---|---|---|
router |
router object |
Specifies the router. For details, see Table 2. |
Attribute |
Type |
Description |
---|---|---|
id |
String |
Specifies the router ID. This parameter is not mandatory when you query routers. |
name |
String |
Specifies the router name. The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.). |
admin_state_up |
Boolean |
Specifies the administrative status. The value can only be true. |
status |
String |
Specifies the router status. The value can be ACTIVE, DOWN, or ERROR. |
tenant_id |
String |
Specifies the project ID. |
external_gateway_info |
external_gateway_info object |
Specifies the external gateway. This is an extended attribute. For details, see the external_gateway_info objects. |
project_id |
String |
Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
created_at |
String |
Specifies the time (UTC) when the router is created. Format: yyyy-MM-ddTHH:mm:ss |
updated_at |
String |
Specifies the time (UTC) when the router is updated. Format: yyyy-MM-ddTHH:mm:ss |
Attribute |
Type |
Description |
---|---|---|
network_id |
String |
Specifies the UUID of the external network. You can use GET /v2.0/networks?router:external=True or run the neutron net-external-list command to query information about the external network. |
enable_snat |
Boolean |
Specifies whether the SNAT function is enabled. The default value is false. |
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 Code
See Status Codes.
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot