Query route table
Updated at:2025-10-16
Description
Retrieve all route tables.
Request structure
Plain Text
1GET /v{version}/route?routeTableId={routeTableId} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | For API version No., the current value is 1 |
| routeTableId | String | No | Query | Route table ID, select either this parameter or vpcId |
| vpcId | String | No | Query | VPC ID, select either this parameter or routeTableId |
Description:
The parameters routeTableId and vpcId cannot both be left empty.
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| name | String | Route table name |
| routeTableId | String | Route table ID |
| vpcId | String | VPC ID |
| routeRules | List<[RouteRule](VPC/API Reference/Appendix.md#RouteRule)> | List of route rules |
Request example
Plain Text
1GET /v1/route?routeTableId=rt-q1zg3i8mx8p6 HTTP/1.1
2Host: bcc.bj.baidubce.com
3Content-Type: application/json;charset=UTF-8
4Authorization: bce-auth-v1/5a6f0606bf5e48f29dd132aa76aa5182/2017-06-12T11:57:26Z/1800/content-type;host;x-bce-date/fd0ba5a693691a50352cb77f4b41cd845ac1a29176398035612a4dde43502982
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 6607c593-0628-4a6f-a10f-d7747312538b
3Date: Mon, 12 Jun 2017 11:57:32 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6{
7 "name": "default",
8 "routeTableId": "rt-q1zg3i8mx8p6",
9 "vpcId": "vpc-56rj0s4ha42a",
10 "routeRules": [
11 {
12 "routeTableId": "rt-q1zg3i8mx8p6",
13 "description": "",
14 "nexthopId": "vpn-snx074964j9d",
15 "destinationAddress": "10.0.0.1/32",
16 "sourceAddress": "192.168.0.0/20",
17 "routeRuleId": "rr-dvq3cxpghw5e",
18 "pathType": "normal",
19 "nexthopType": "vpn"
20 },
21 {
22 "routeTableId": "rt-q1zg3i8mx8p6",
23 "description": "",
24 "nexthopId": "",
25 "destinationAddress": "192.168.0.0/20",
26 "sourceAddress": "0.0.0.0/0",
27 "routeRuleId": "",
28 "pathType": "normal",
29 "nexthopType": "sys"
30 },
31 {
32 "routeTableId": "rt-q1zg3i8mx8p6",
33 "description": "",
34 "nexthopId": "",
35 "destinationAddress": "192.168.0.0/20",
36 "sourceAddress": "0.0.0.0/0",
37 "routeRuleId": "",
38 "pathType": "normal",
39 "nexthopType": "sys"
40 }
41 ]
42}
