Queries the details of a gateway route.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:GetGatewayRouteDetail |
get |
*Gateway
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RouteId |
integer |
Yes |
Route ID. |
1050 |
| GatewayUniqueId |
string |
Yes |
Gateway unique identifier ID. |
gw-5d3a78a53ec947aa928212d671d400ac |
| AcceptLanguage |
string |
No |
Language type of the returned information:
|
zh |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
Data structure. |
||
| RequestId |
string |
Request ID. |
FDF2D16C-5D28-5FAA-A56B-30BDE3559880 |
| HttpStatusCode |
integer |
HTTP status code. |
200 |
| Message |
string |
Error message. |
You are not authorized to perform this operation. |
| Code |
integer |
Status code. Note that 200 indicates success. |
200 |
| Success |
boolean |
Request result, with the following values:
|
true |
| Data |
object |
Returned data. |
|
| Id |
integer |
ID. |
1050 |
| Name |
string |
Name. |
test |
| GatewayUniqueId |
string |
Gateway unique identifier ID. |
gw-7ea3da97b96543e19f6c597c**** |
| GatewayId |
integer |
Gateway ID. |
1 |
| DefaultServiceId |
integer |
Default service ID. |
3 |
| DefaultServiceName |
string |
Default service name. |
test |
| Status |
integer |
Route status.
|
0 |
| GmtCreate |
string |
Creation time. |
2022-01-07 18:07:57 |
| GmtModified |
string |
Last modification time. |
2022-01-07T10:07:57.000+0000 |
| RouteOrder |
integer |
Route order. |
1 |
| Predicates |
string |
Matching conditions. |
{} |
| RoutePredicates |
object |
Route matching. |
|
| PathPredicates |
object |
Route matching. |
|
| Path |
string |
Path. |
/api |
| Type |
string |
Matching type. |
PRE |
| IgnoreCase |
boolean |
Whether to ignore case. |
true |
| MethodPredicates |
array |
Method matching. |
|
|
string |
Method. |
GET |
|
| HeaderPredicates |
array |
Header matching. |
|
|
object |
Request header. |
||
| Key |
string |
Request header KEY. |
id |
| Value |
string |
Matching value. |
200 |
| Type |
string |
Type. |
PRE |
| QueryPredicates |
array |
Parameter matching. |
|
|
object |
Parameter. |
||
| Key |
string |
Parameter name. |
userid |
| Value |
string |
Matching value. |
test |
| Type |
string |
Type. |
PRE |
| DomainId |
integer |
Domain ID. |
235 |
| DomainName |
string |
Domain name. |
123.com |
| Services |
string |
Service configuration information. |
[{\"Percent\":100,\"ServiceId\":126}] |
| RouteServices |
array |
Services. |
|
|
object |
Service. |
||
| ServiceId |
integer |
Service ID. |
782 |
| ServiceName |
string |
Service name. |
xkc-crm |
| Percent |
integer |
Weight. |
80 |
| Version |
string |
Service version. |
v1 |
| Name |
string |
Service name. |
dubbo4 |
| SourceType |
string |
Service source. |
MSE |
| Namespace |
string |
Namespace. |
acs_ecs_dashboard |
| GroupName |
string |
Service group name. |
api |
| AgreementType |
string |
Protocol Type. |
DUBBO |
| HttpDubboTranscoder |
object |
Dubbo protocol conversion body. |
|
| DubboServiceName |
string |
Dubbo service name. |
|
| DubboServiceVersion |
string |
Dubbo service version. |
|
| MothedMapList |
array |
Dubbo forwarding rule list. |
|
|
object |
|||
| DubboMothedName |
string |
Dubbo method name. |
|
| HttpMothed |
string |
Http method. Note
Supported http method parameter values.
|
|
| Mothedpath |
string |
Method matching path. |
|
| PassThroughAllHeaders |
string |
Header pass-through type. Note
Pass-through type enumeration values.
|
|
| PassThroughList |
array |
Specified Header pass-through list. |
|
|
string |
Specified Header pass-through value. |
||
| ParamMapsList |
array |
Parameter mapping list. |
|
|
object |
|||
| ExtractKeySpec |
string |
Input parameter position. Note
Input parameter position enumeration values.
|
|
| ExtractKey |
string |
Input parameter extraction Key. |
|
| MappingType |
string |
Backend parameter type. |
|
| DubboServiceGroup |
string |
Dubbo service group. |
|
| ServicePort |
integer |
Service port. |
20880 |
| HealthStatus |
string |
Health status
|
Health |
| UnhealthyEndpoints |
array |
Unhealthy Endpoint list |
|
|
string |
Unhealthy Endpoint |
192.168.1.2 |
|
| HTTPRewrite |
object |
Rewrite policy information. |
|
| Status |
string |
Enabling status. |
off |
| Path |
string |
Node path. |
/test/client |
| Host |
string |
Instance address. |
aliyuncs.com |
| PathType |
string |
Rewrite type. |
PRE |
| Pattern |
string |
Matching Pattern. |
/test |
| Substitution |
string |
Replacement. |
test |
| HeaderOp |
object |
Header settings information. |
|
| Status |
string |
Status. |
off |
| HeaderOpItems |
array |
Header field objects. |
|
|
object |
Setting policy. |
||
| DirectionType |
string |
Request or response. |
Response |
| OpType |
string |
Operation type. |
Add |
| Key |
string |
Header Key. |
debug |
| Value |
string |
Setting value. |
test |
| DestinationType |
string |
Target service type. |
Single |
| DirectResponse |
object |
Mock information. |
|
| Code |
integer |
Response code. |
200 |
| Body |
string |
Mock return value. |
{} |
| Cors |
object |
Cross-domain configuration. |
|
| Status |
string |
Status. |
off |
| AllowOrigins |
string |
Cross-domain. |
* |
| AllowMethods |
string |
Cross-domain methods. |
GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH |
| AllowHeaders |
string |
Cross-domain Header. |
* |
| ExposeHeaders |
string |
Response header. |
* |
| TimeUnit |
string |
Time unit. |
h |
| UnitNum |
integer |
Time number. |
24 |
| AllowCredentials |
boolean |
Allow credentials. |
true |
| Timeout |
object |
Timeout configuration. |
|
| UnitNum |
integer |
Time number. |
10 |
| TimeUnit |
string |
Time unit. |
s |
| Status |
string |
Status. |
off |
| Retry |
object |
Retry configuration. |
|
| Attempts |
integer |
Number of retry attempts. |
1 |
| RetryOn |
array |
Retry conditions. |
|
|
string |
Retry condition. |
5xx |
|
| HttpCodes |
array |
HTTP status codes. |
|
|
string |
HTTP status code. |
500 |
|
| Status |
string |
Retry status. |
on |
| DomainIdList |
array |
Domain list |
|
|
integer |
Domain ID list. |
1 |
|
| DomainNameList |
array |
Domain name list |
|
|
string |
Domain name list. |
test.com |
|
| Redirect |
object |
Redirection configuration |
|
| Code |
integer |
Response code. |
200 |
| Host |
string |
Host. |
16 |
| Path |
string |
Path. |
10111 |
| FlowMirror |
object |
Traffic mirroring configuration. |
|
| TargetServiceId |
integer |
Target service ID. |
21 |
| TargetServiceName |
string |
Target service name. |
test |
| Port |
integer |
Target service port. |
8790 |
| Percentage |
integer |
Traffic replication percentage (%), value range 0-100. |
90 |
| Status |
string |
Enabling status, values:
|
on |
| EnableWaf |
boolean |
Whether to enable Waf. |
true |
| AhasStatus |
integer |
Ahas status. |
1 |
| Fallback |
boolean |
Whether to enable Fallback service. |
true |
| FallbackServices |
array |
Fallback services. |
|
|
object |
Data object. |
||
| ServiceId |
integer |
Service ID. |
1 |
| ServiceName |
string |
Service name. |
name |
| Percent |
integer |
Weight percentage. |
80 |
| Version |
string |
Service version. |
v1 |
| Name |
string |
Name. |
name |
| SourceType |
string |
Source type. |
MSE |
| Namespace |
string |
Service namespace. |
namespace |
| GroupName |
string |
Service group name. |
test |
| AgreementType |
string |
Protocol Type. |
DUBBO |
| ServicePort |
integer |
Service port. |
8848 |
| Policies |
string |
Routing policy Json string. |
{ "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 |
Route description |
a route for xxx |
Examples
Success response
JSON format
{
"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": "",
"DubboServiceVersion": "",
"MothedMapList": [
{
"DubboMothedName": "",
"HttpMothed": "",
"Mothedpath": "",
"PassThroughAllHeaders": "",
"PassThroughList": [
""
],
"ParamMapsList": [
{
"ExtractKeySpec": "",
"ExtractKey": "",
"MappingType": ""
}
]
}
],
"DubboServiceGroup": ""
},
"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"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
| 400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
| 500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
| 404 | NotFound | Not found:%s | The resource does not exist:%s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.