查询网关路由列表。
调试
您可以在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 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。