查詢網關路由列表。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
mse:ListGatewayRoute |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| PageNumber |
integer |
否 |
頁碼。 |
1 |
| PageSize |
integer |
否 |
每頁展示執行個體數(暫未生效,預設查詢全量)。 |
10 |
| OrderItem |
string |
否 |
排序屬性。 |
GmtCreate |
| DescSort |
boolean |
否 |
排序。該欄位目前不可用,下線中。 |
false |
| FilterParams |
object |
否 |
過濾條件,格式為{"key1":"value1"}。 |
|
| GatewayId |
integer |
否 |
網關 ID。 |
81 |
| Name |
string |
否 |
路由名稱。 |
test |
| Status |
integer |
否 |
路由狀態:
|
3 |
DefaultServiceId
deprecated
|
integer |
否 |
預設服務 ID。 |
1 |
| RouteOrder |
integer |
否 |
順序(未使用)。 |
1 |
| DomainId |
integer |
否 |
網域名稱 id。 |
284 |
| GatewayUniqueId |
string |
是 |
網關唯一標識 ID。 |
gw-30a0106924c94bca8712ec4e79fc5acc |
| DomainName |
string |
否 |
關聯網域名稱 |
*.alites.com |
| Path |
string |
否 |
路由路徑。 |
/test |
| AcceptLanguage |
string |
否 |
返回資訊的語言類型:
|
zh |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
資料結構。 |
||
| RequestId |
string |
請求 ID。 |
83F02EAB-ECDF-55C6-B332-8649E5E7AF2C |
| HttpStatusCode |
integer |
HTTP 狀態代碼。 |
200 |
| Message |
string |
錯誤資訊。 |
You are not authorized to perform this operation. |
| Code |
integer |
代碼。 |
200 |
| Success |
boolean |
請求結果,取值如下:
|
true |
| Data |
object |
返回資料。 |
|
| TotalSize |
integer |
總條數。 |
36 |
| PageNumber |
integer |
頁碼。 |
11 |
| PageSize |
integer |
分頁大小。 |
10 |
| Result |
array |
資料結構。 |
|
|
object |
返回集合。 |
||
| Id |
integer |
路由 ID。 |
47 |
| Name |
string |
名稱。 |
test |
| GatewayUniqueId |
string |
網關唯一標識。 |
gw-cf0e7f52ecc7429dbc7ba4d5e3656100 |
| GatewayId |
integer |
網關 ID。 |
496 |
| Status |
integer |
狀態。 |
2 |
| RouteOrder |
integer |
順序 |
1 |
| DefaultServiceName |
string |
預設服務名稱。 |
test |
| DefaultServiceId |
integer |
預設服務 id。 |
1 |
| Predicates |
string |
匹配規則 |
{\"PathPredicates\":{\"Path\":\"/rpc/compute \",\"Type\":\"PRE\",\"IgnoreCase\":true}} |
| RoutePredicates |
object |
匹配規則 |
|
| PathPredicates |
object |
路由 Path 匹配。 |
|
| Path |
string |
節點路徑。 |
/getIp |
| Type |
string |
匹配類型。 |
PRE |
| IgnoreCase |
boolean |
忽略大小寫 |
true |
| MethodPredicates |
array |
HTTP 方法匹配 |
|
|
string |
方法 |
GET |
|
| HeaderPredicates |
array |
Header 匹配 |
|
|
object |
Header 列表 |
||
| Key |
string |
Header KEY |
userid |
| Value |
string |
匹配值 |
test |
| Type |
string |
匹配類型 |
PRE |
| QueryPredicates |
array |
參數匹配 |
|
|
object |
參數列表 |
||
| Key |
string |
參數名稱 |
userid |
| Value |
string |
匹配值 |
test |
| Type |
string |
匹配類型 |
PRE |
| GmtCreate |
string |
建立時間。 |
2022-01-25T07:14:01.817+0000 |
| GmtModified |
string |
修改時間 |
2022-01-07 18:07:57 |
| Services |
string |
服務。 |
[] |
| RouteServices |
array |
服務。 |
|
|
object |
服務列表 |
||
| ServiceId |
integer |
服務 ID |
1563 |
| ServiceName |
string |
服務名稱。 |
hu |
| Percent |
integer |
權重百分比 |
11 |
| Version |
string |
服務版本。 |
v1 |
| Name |
string |
名稱。 |
test |
| SourceType |
string |
來源類型 |
MSE |
| Namespace |
string |
命名空間。 |
default |
| GroupName |
string |
服務組名稱。 |
api |
| AgreementType |
string |
協議類型。 |
DUBBO |
| HttpDubboTranscoder |
object |
Dubbo 協議轉換體。 |
|
| DubboServiceName |
string |
Dubbo 服務名稱。 |
org.apache.dubbo.samples.basic.api.DemoService |
| DubboServiceVersion |
string |
Dubbo 服務版本。 |
0.0.0 |
| MothedMapList |
array |
Dubbo 轉寄規則列表。 |
|
|
object |
方法映射體。 |
||
| DubboMothedName |
string |
Dubbo 方法名。 |
sayHello |
| HttpMothed |
string |
Http 方法。 說明
支援 http 方法參數值。
|
ALL_GET |
| Mothedpath |
string |
方法匹配路徑。 |
/mytestzbk/sayhello |
| PassThroughAllHeaders |
string |
Header 透傳類型。 說明
透傳類型枚舉值。
|
PASS_NOT |
| PassThroughList |
array |
指定透傳 Header 列表。 |
|
|
string |
指定 Header 透傳值。 |
x-forward |
|
| ParamMapsList |
array |
參數映射列表。 |
|
|
object |
參數映射體。 |
||
| ExtractKeySpec |
string |
入參位置。 說明
入參位置枚舉值。
|
ALL_QUERY_PARAMETER |
| ExtractKey |
string |
入參位提取 Key。 |
name |
| MappingType |
string |
後端參數類型。 |
java.lang.String |
| DubboServiceGroup |
string |
Dubbo 服務組。 |
service group |
| ServicePort |
integer |
服務連接埠。 |
20880 |
| HealthStatus |
string |
健康狀態
|
Health |
| UnhealthyEndpoints |
array |
非健康 Endpoint 列表 |
|
|
string |
非健康 Endpoint |
192.168.1.2 |
|
| DomainId |
integer |
網域名稱 ID。 |
265 |
| DomainName |
string |
網域名稱。 |
y.com |
| DestinationType |
string |
目標類型。 |
Single |
| DirectResponse |
object |
Mock 配置 |
|
| Code |
integer |
響應碼。 |
200 |
| Body |
string |
Mock 傳回值 |
hello |
| DomainIdList |
array |
網域名稱列表。 |
|
|
integer |
網域名稱 ID |
123 |
|
| DomainNameList |
array |
網域名稱列表。 |
|
|
string |
網域名稱 |
test.com |
|
| Redirect |
object |
重新導向 |
|
| Code |
integer |
響應碼。 |
200 |
| Host |
string |
重新導向主機名稱 |
test.com |
| Path |
string |
路徑。 |
/test |
| Type |
string |
路由類型 |
Op |
| Comment |
object |
路由備忘(ingress) |
|
| Status |
string |
狀態。 |
error |
| EnableWaf |
string |
是否開啟 waf |
false |
| Fallback |
boolean |
是否開啟 Fallback 服務。 |
true |
| FallbackServices |
array |
Fallback 服務。 |
|
|
object |
|||
| ServiceId |
integer |
服務 ID。 |
353 |
| ServiceName |
string |
服務名稱。 |
service name |
| Percent |
integer |
權重百分比。 |
100 |
| Version |
string |
服務版本。 |
v1 |
| Name |
string |
名稱。 |
name |
| SourceType |
string |
來源類型。 |
MSE |
| Namespace |
string |
服務所在命名空間。 |
Namespace |
| GroupName |
string |
服務分組名稱。 |
test |
| AgreementType |
string |
協議類型。 |
DUBBO |
| ServicePort |
integer |
服務連接埠。 |
8848 |
| DynamicRoute |
boolean |
是否開啟動態路由 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "83F02EAB-ECDF-55C6-B332-8649E5E7AF2C",
"HttpStatusCode": 200,
"Message": "You are not authorized to perform this operation.",
"Code": 200,
"Success": true,
"Data": {
"TotalSize": 36,
"PageNumber": 11,
"PageSize": 10,
"Result": [
{
"Id": 47,
"Name": "test",
"GatewayUniqueId": "gw-cf0e7f52ecc7429dbc7ba4d5e3656100",
"GatewayId": 496,
"Status": 2,
"RouteOrder": 1,
"DefaultServiceName": "test",
"DefaultServiceId": 1,
"Predicates": "{\\\"PathPredicates\\\":{\\\"Path\\\":\\\"/rpc/compute \\\",\\\"Type\\\":\\\"PRE\\\",\\\"IgnoreCase\\\":true}}",
"RoutePredicates": {
"PathPredicates": {
"Path": "/getIp",
"Type": "PRE",
"IgnoreCase": true
},
"MethodPredicates": [
"GET"
],
"HeaderPredicates": [
{
"Key": "userid",
"Value": "test",
"Type": "PRE"
}
],
"QueryPredicates": [
{
"Key": "userid",
"Value": "test",
"Type": "PRE"
}
]
},
"GmtCreate": "2022-01-25T07:14:01.817+0000",
"GmtModified": "2022-01-07 18:07:57",
"Services": "[]",
"RouteServices": [
{
"ServiceId": 1563,
"ServiceName": "hu",
"Percent": 11,
"Version": "v1",
"Name": "test",
"SourceType": "MSE",
"Namespace": "default",
"GroupName": "api",
"AgreementType": "DUBBO",
"HttpDubboTranscoder": {
"DubboServiceName": "org.apache.dubbo.samples.basic.api.DemoService",
"DubboServiceVersion": "0.0.0",
"MothedMapList": [
{
"DubboMothedName": "sayHello",
"HttpMothed": "ALL_GET",
"Mothedpath": "/mytestzbk/sayhello",
"PassThroughAllHeaders": "PASS_NOT",
"PassThroughList": [
"x-forward"
],
"ParamMapsList": [
{
"ExtractKeySpec": "ALL_QUERY_PARAMETER",
"ExtractKey": "name",
"MappingType": "java.lang.String"
}
]
}
],
"DubboServiceGroup": "service group"
},
"ServicePort": 20880,
"HealthStatus": "Health",
"UnhealthyEndpoints": [
"192.168.1.2"
]
}
],
"DomainId": 265,
"DomainName": "y.com",
"DestinationType": "Single",
"DirectResponse": {
"Code": 200,
"Body": "hello"
},
"DomainIdList": [
123
],
"DomainNameList": [
"test.com"
],
"Redirect": {
"Code": 200,
"Host": "test.com",
"Path": "/test"
},
"Type": "Op",
"Comment": {
"Status": "error"
},
"EnableWaf": "false",
"Fallback": true,
"FallbackServices": [
{
"ServiceId": 353,
"ServiceName": "service name",
"Percent": 100,
"Version": "v1",
"Name": "name",
"SourceType": "MSE\n",
"Namespace": "Namespace",
"GroupName": "test",
"AgreementType": "DUBBO",
"ServicePort": 8848
}
],
"DynamicRoute": true
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | 非法請求: %s |
| 400 | InvalidParameter | Parameter error:%s | 請求參數錯誤:%s |
| 500 | InternalError | Console error. Try again later:%s | 控制台錯誤.稍後重試:%s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | 沒有許可權使用此介面:%s |
| 404 | NotFound | Not found:%s | 資源不存在:%s |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。