All Products
Search
Document Center

Microservices Engine:GetGatewayRouteDetail

Last Updated:Jul 23, 2025

Queries the details of a gateway route.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mse:GetGatewayRouteDetail

get

*Gateway

acs:mse:{#regionId}:{#accountId}:instance/{#GatewayUniqueId}

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: Chinese

  • en: English

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: The request is successful.

  • false: The request failed.

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.

  • Not published: 0

  • Publishing: 2

  • Published: 3

  • Editing (updates not published): 4

  • Unpublishing: 5

  • Unavailable: 6

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.

  • ALL_GET

  • ALL_POST

  • ALL_PUT

  • ALL_DELETE

  • ALL_PATCH

Mothedpath

string

Method matching path.

PassThroughAllHeaders

string

Header pass-through type.

Note

Pass-through type enumeration values.

  • Pass through all: PASS_ALL

  • No pass-through: PASS_NOT

  • Specified parameters: PASS_ASSIGN

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.

  • Request parameter: ALL_QUERY_PARAMETER

  • Request header: ALL_HEADER

  • URI of the request: ALL_PATH

  • Request body: ALL_BODY

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

  • Unhealthy

  • Checking

  • Unknown

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: enabled

  • off: disabled

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.