Querying Route Tables¶
Function¶
This API is used to query all route tables of the tenant submitting the request. The route tables are filtered based on the filtering condition.
URI¶
GET /v1/{project_id}/routetables
Example:
GET https://{Endpoint}/v1/{project_id}/routetables?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d&vpc_id=3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85&subnet_id=9873b33f-ac1c-4630-ad1c-7dba1ed79r78
Table 1 describes the parameters.
Name | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Specifies the project ID. |
limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax (2^31-1). The default value is 2000. limit can be used together with marker. For details, see the parameter description of marker. |
marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. This parameter can work together with the parameter limit.
|
id | No | String | Specifies the route table ID, which can be used to filter the route table with the corresponding ID. |
vpc_id | No | String | Specifies the VPC UUID. |
subnet_id | No | String | Specifies the subnet ID. If you use the management console, the value of this parameter is the Network ID value. |
Request Parameters¶
None
Example Request¶
GET https://{Endpoint}/v1/{project_id}/routetables?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d&vpc_id=3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85&subnet_id=9873b33f-ac1c-4630-ad1c-7dba1ed79r78
Response Parameters¶
Name | Type | Description |
---|---|---|
routetables | Array of routetable objects | Specifies the route table list. For details, see Table 3. |
Name | Type | Description |
---|---|---|
id | String |
|
name | String |
|
default | Boolean |
|
subnets | Array of subnet objects |
|
tenant_id | String |
|
vpc_id | String |
|
description | String |
|
created_at | String |
|
updated_at | String |
|
Name | Type | Description |
---|---|---|
id | String | Specifies the ID of the subnet associated with the route table. |
Example Response¶
{
"routetables": [
{
"id": "3d42a0d4-a980-4613-ae76-a2cddecff054",
"name": "routetable-1234",
"vpc_id": "ab78be2d-782f-42a5-aa72-35879f6890ff",
"subnets": [
{
"id": "8d4ce32f-d68a-4c4c-9f18-c68d8a5c7f2f"
}
],
"tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
"description": "abc",
"created_at": "2022-12-15T02:56:40",
"updated_at": "2022-12-15T02:56:40"
},
{
"id": "3d42a0d4-a980-4613-ae76-a2cddecfff89",
"name": "routetable-5678",
"vpc_id": "ab78be2d-782f-42a5-aa72-35879f667809",
"subnets": [
{
"id": "8d4ce32f-d68a-4c4c-9f18-c68d8a5c7f2f"
}
],
"tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
"description": "abc",
"created_at": "2022-12-15T02:59:03",
"updated_at": "2022-12-15T02:59:03"
}
]
}
Status Code¶
See Status Codes.
Error Code¶
See Error Codes.