查询网关路由详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
mse:GetGatewayRouteDetail |
get |
*Gateway
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
RouteId |
integer |
是 |
路由 ID。 |
1050 |
GatewayUniqueId |
string |
是 |
网关唯一标识 ID。 |
gw-5d3a78a53ec947aa928212d671d400ac |
AcceptLanguage |
string |
否 |
返回信息的语言类型:
|
zh |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
数据结构。 |
||
RequestId |
string |
请求 ID。 |
FDF2D16C-5D28-5FAA-A56B-30BDE3559880 |
HttpStatusCode |
integer |
HTTP 状态码。 |
200 |
Message |
string |
错误信息。 |
You are not authorized to perform this operation. |
Code |
integer |
状态码。说明 200 表示成功。 |
200 |
Success |
boolean |
请求结果,取值如下:
|
true |
Data |
object |
返回数据。 |
|
Id |
integer |
ID。 |
1050 |
Name |
string |
名称。 |
test |
GatewayUniqueId |
string |
网关唯一标识 ID。 |
gw-7ea3da97b96543e19f6c597c**** |
GatewayId |
integer |
网关 ID。 |
1 |
DefaultServiceId |
integer |
默认服务 ID。 |
3 |
DefaultServiceName |
string |
默认服务名称。 |
test |
Status |
integer |
路由状态。
|
0 |
GmtCreate |
string |
创建时间。 |
2022-01-07 18:07:57 |
GmtModified |
string |
最后修改时间。 |
2022-01-07T10:07:57.000+0000 |
RouteOrder |
integer |
路由顺序。 |
1 |
Predicates |
string |
匹配条件。 |
{} |
RoutePredicates |
object |
路由匹配。 |
|
PathPredicates |
object |
路由匹配。 |
|
Path |
string |
路径。 |
/api |
Type |
string |
匹配类型。 |
PRE |
IgnoreCase |
boolean |
是否忽略大小写。 |
true |
MethodPredicates |
array |
方法匹配。 |
|
string |
方法。 |
GET |
|
HeaderPredicates |
array |
头匹配。 |
|
object |
请求头。 |
||
Key |
string |
请求头 KEY。 |
id |
Value |
string |
匹配值。 |
200 |
Type |
string |
类型。 |
PRE |
QueryPredicates |
array |
参数匹配。 |
|
object |
参数。 |
||
Key |
string |
参数名称。 |
userid |
Value |
string |
匹配值。 |
test |
Type |
string |
类型。 |
PRE |
DomainId |
integer |
域名 ID。 |
235 |
DomainName |
string |
域名。 |
123.com |
Services |
string |
服务的配置信息。 |
[{\"Percent\":100,\"ServiceId\":126}] |
RouteServices |
array |
服务。 |
|
object |
服务。 |
||
ServiceId |
integer |
服务 ID。 |
782 |
ServiceName |
string |
服务名称。 |
xkc-crm |
Percent |
integer |
权重。 |
80 |
Version |
string |
服务版本。 |
v1 |
Name |
string |
服务名称。 |
dubbo4 |
SourceType |
string |
服务来源。 |
MSE |
Namespace |
string |
命名空间。 |
acs_ecs_dashboard |
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 |
|
HTTPRewrite |
object |
重写策略信息。 |
|
Status |
string |
开启状态。 |
off |
Path |
string |
节点路径。 |
/test/client |
Host |
string |
实例地址。 |
aliyuncs.com |
PathType |
string |
重写类型。 |
PRE |
Pattern |
string |
匹配 Pattern。 |
/test |
Substitution |
string |
替换。 |
test |
HeaderOp |
object |
Header 设置信息。 |
|
Status |
string |
状态。 |
off |
HeaderOpItems |
array |
头字段对象。 |
|
object |
设置策略。 |
||
DirectionType |
string |
请求或响应。 |
Response |
OpType |
string |
操作类型。 |
Add |
Key |
string |
Header Key。 |
debug |
Value |
string |
设置值。 |
test |
DestinationType |
string |
目标服务类型。 |
Single |
DirectResponse |
object |
Mock 信息。 |
|
Code |
integer |
响应码。 |
200 |
Body |
string |
Mock 返回值。 |
{} |
Cors |
object |
跨域配置。 |
|
Status |
string |
状态。 |
off |
AllowOrigins |
string |
跨域。 |
* |
AllowMethods |
string |
跨域方法。 |
GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH |
AllowHeaders |
string |
跨域 Header。 |
* |
ExposeHeaders |
string |
响应头。 |
* |
TimeUnit |
string |
时间单位。 |
h |
UnitNum |
integer |
时间数。 |
24 |
AllowCredentials |
boolean |
允许携带凭证。 |
true |
Timeout |
object |
超时配置。 |
|
UnitNum |
integer |
时间数。 |
10 |
TimeUnit |
string |
时间单位。 |
s |
Status |
string |
状态。 |
off |
Retry |
object |
重试配置。 |
|
Attempts |
integer |
重试次数。 |
1 |
RetryOn |
array |
重试条件。 |
|
string |
重试条件。 |
5xx |
|
HttpCodes |
array |
HTTP 状态码。 |
|
string |
HTTP 状态码。 |
500 |
|
Status |
string |
重试状态。 |
on |
DomainIdList |
array |
域名列表 |
|
integer |
域名 ID 列表。 |
1 |
|
DomainNameList |
array |
域名列表 |
|
string |
域名列表。 |
test.com |
|
Redirect |
object |
重定向配置 |
|
Code |
integer |
响应码。 |
200 |
Host |
string |
主机。 |
16 |
Path |
string |
路径。 |
10111 |
FlowMirror |
object |
流量镜像配置。 |
|
TargetServiceId |
integer |
目标服务 ID。 |
21 |
TargetServiceName |
string |
目标服务名称。 |
test |
Port |
integer |
目标服务端口。 |
8790 |
Percentage |
integer |
流量复制比例(%),取值 0-100。 |
90 |
Status |
string |
开启状态,取值:
|
on |
EnableWaf |
boolean |
是否开启 Waf。 |
true |
AhasStatus |
integer |
Ahas 状态。 |
1 |
Fallback |
boolean |
是否开启 Fallback 服务。 |
true |
FallbackServices |
array |
Fallback 服务。 |
|
object |
数据对象。 |
||
ServiceId |
integer |
服务 ID。 |
1 |
ServiceName |
string |
服务名称。 |
name |
Percent |
integer |
权重百分比。 |
80 |
Version |
string |
服务版本。 |
v1 |
Name |
string |
名称。 |
name |
SourceType |
string |
来源类型。 |
MSE |
Namespace |
string |
服务所在命名空间。 |
namespace |
GroupName |
string |
服务分组名称。 |
test |
AgreementType |
string |
协议类型。 |
DUBBO |
ServicePort |
integer |
服务端口。 |
8848 |
Policies |
string |
路由策略 Json 字符串。 |
{ "CORS": "{\"allowMethods\":\"GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH\",\"allowHeaders\":\"*\",\"exposeHeaders\":\"*\",\"unitNum\":12,\"allowCredentials\":true,\"status\":\"off\",\"allowOrigins\":\"*\",\"timeUnit\":\"h\"}", "Timeout": "{\"unitNum\":10,\"timeUnit\":\"s\",\"status\":\"off\"}", "Retry": "{\"attempts\":2,\"retryOn\":[\"5xx\"],\"status\":\"off\"}", "HTTPRewrite": "{\"pathType\":\"EQUAL\",\"path\":\"/o\",\"status\":\"off\"}", "Waf": "{\"enabled\":false}", "HeaderOp": "{\"status\":\"off\",\"headerOpItems\":[{\"directionType\":\"Request\",\"opType\":\"Add\",\"key\":\"kkk\",\"value\":\"ll\"}]}" } |
Description |
string |
路由描述 |
a route for xxx |
示例
正常返回示例
JSON
格式
{
"RequestId": "FDF2D16C-5D28-5FAA-A56B-30BDE3559880",
"HttpStatusCode": 200,
"Message": "You are not authorized to perform this operation.",
"Code": 200,
"Success": true,
"Data": {
"Id": 1050,
"Name": "test",
"GatewayUniqueId": "gw-7ea3da97b96543e19f6c597c****",
"GatewayId": 1,
"DefaultServiceId": 3,
"DefaultServiceName": "test",
"Status": 0,
"GmtCreate": "2022-01-07 18:07:57",
"GmtModified": "2022-01-07T10:07:57.000+0000",
"RouteOrder": 1,
"Predicates": "{}",
"RoutePredicates": {
"PathPredicates": {
"Path": "/api",
"Type": "PRE",
"IgnoreCase": true
},
"MethodPredicates": [
"GET"
],
"HeaderPredicates": [
{
"Key": "id",
"Value": "200",
"Type": "PRE"
}
],
"QueryPredicates": [
{
"Key": "userid",
"Value": "test",
"Type": "PRE"
}
]
},
"DomainId": 235,
"DomainName": "123.com",
"Services": "[{\\\"Percent\\\":100,\\\"ServiceId\\\":126}]",
"RouteServices": [
{
"ServiceId": 782,
"ServiceName": "xkc-crm",
"Percent": 80,
"Version": "v1",
"Name": "dubbo4",
"SourceType": "MSE",
"Namespace": "acs_ecs_dashboard",
"GroupName": "api",
"AgreementType": "DUBBO",
"HttpDubboTranscoder": {
"DubboServiceName": "org.apache.dubbo.samples.basic.api.DemoService\n",
"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"
]
}
],
"HTTPRewrite": {
"Status": "off",
"Path": "/test/client",
"Host": "aliyuncs.com",
"PathType": "PRE",
"Pattern": "/test",
"Substitution": "test"
},
"HeaderOp": {
"Status": "off",
"HeaderOpItems": [
{
"DirectionType": "Response",
"OpType": "Add",
"Key": "debug",
"Value": "test"
}
]
},
"DestinationType": "Single",
"DirectResponse": {
"Code": 200,
"Body": "{}"
},
"Cors": {
"Status": "off",
"AllowOrigins": "*",
"AllowMethods": "GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH",
"AllowHeaders": "*",
"ExposeHeaders": "*",
"TimeUnit": "h",
"UnitNum": 24,
"AllowCredentials": true
},
"Timeout": {
"UnitNum": 10,
"TimeUnit": "s",
"Status": "off"
},
"Retry": {
"Attempts": 1,
"RetryOn": [
"5xx"
],
"HttpCodes": [
"500"
],
"Status": "on"
},
"DomainIdList": [
1
],
"DomainNameList": [
"test.com"
],
"Redirect": {
"Code": 200,
"Host": "16",
"Path": "10111"
},
"FlowMirror": {
"TargetServiceId": 21,
"TargetServiceName": "test",
"Port": 8790,
"Percentage": 90,
"Status": "on"
},
"EnableWaf": true,
"AhasStatus": 1,
"Fallback": true,
"FallbackServices": [
{
"ServiceId": 1,
"ServiceName": "name",
"Percent": 80,
"Version": "v1",
"Name": "name",
"SourceType": "MSE",
"Namespace": "namespace",
"GroupName": "test",
"AgreementType": "DUBBO",
"ServicePort": 8848
}
],
"Policies": "{\n \"CORS\": \"{\\\"allowMethods\\\":\\\"GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH\\\",\\\"allowHeaders\\\":\\\"*\\\",\\\"exposeHeaders\\\":\\\"*\\\",\\\"unitNum\\\":12,\\\"allowCredentials\\\":true,\\\"status\\\":\\\"off\\\",\\\"allowOrigins\\\":\\\"*\\\",\\\"timeUnit\\\":\\\"h\\\"}\",\n \"Timeout\": \"{\\\"unitNum\\\":10,\\\"timeUnit\\\":\\\"s\\\",\\\"status\\\":\\\"off\\\"}\",\n \"Retry\": \"{\\\"attempts\\\":2,\\\"retryOn\\\":[\\\"5xx\\\"],\\\"status\\\":\\\"off\\\"}\",\n \"HTTPRewrite\": \"{\\\"pathType\\\":\\\"EQUAL\\\",\\\"path\\\":\\\"/o\\\",\\\"status\\\":\\\"off\\\"}\",\n \"Waf\": \"{\\\"enabled\\\":false}\",\n \"HeaderOp\": \"{\\\"status\\\":\\\"off\\\",\\\"headerOpItems\\\":[{\\\"directionType\\\":\\\"Request\\\",\\\"opType\\\":\\\"Add\\\",\\\"key\\\":\\\"kkk\\\",\\\"value\\\":\\\"ll\\\"}]}\"\n}",
"Description": "a route for xxx"
}
}
错误码
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 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。