查询网关路由详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
mse:GetGatewayRouteDetail | get |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RouteId | long | 是 | 路由 ID。 | 1050 |
GatewayUniqueId | string | 是 | 网关唯一标识 ID。 | gw-5d3a78a53ec947aa928212d671d400ac |
AcceptLanguage | string | 否 | 返回信息的语言类型:
| zh |
返回参数
示例
正常返回示例
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 |
403 | NoPermission | You are not authorized to perform this operation:%s | 没有权限使用此接口:%s |
404 | NotFound | Not found:%s | 资源不存在:%s |
500 | InternalError | Console error. Try again later:%s | 控制台错误.稍后重试:%s |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2024-01-29 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-01-18 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-08-22 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-03-02 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2022-02-18 | 新增 OpenAPI | 查看变更详情 |