All Products
Search
Document Center

Microservices Engine:GetGatewayRouteDetail

Last Updated:Jun 10, 2026

Mengkueri detail entri rute gerbang.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

mse:GetGatewayRouteDetail

get

*Gateway

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RouteId

integer

Yes

ID entri rute.

1050

GatewayUniqueId

string

Yes

ID pengidentifikasi unik gerbang.

gw-5d3a78a53ec947aa928212d671d400ac

AcceptLanguage

string

No

Jenis bahasa informasi yang dikembalikan:

  • zh: Bahasa Mandarin

  • en: Bahasa Inggris.

zh

Elemen respons

Element

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<object>

Header matching.

object

Request header.

Key

string

Request header KEY.

id

Value

string

Matching value.

200

Type

string

Type.

PRE

QueryPredicates

array<object>

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<object>

Services.

array<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.

org.apache.dubbo.samples.basic.api.DemoService

DubboServiceVersion

string

Dubbo service version.

0.0.0

MothedMapList

array<object>

Dubbo forwarding rule list.

array<object>

DubboMothedName

string

Dubbo method name.

sayHello

HttpMothed

string

Http method.

Catatan

Supported http method parameter values.

  • ALL_GET

  • ALL_POST

  • ALL_PUT

  • ALL_DELETE

  • ALL_PATCH

ALL_GET

Mothedpath

string

Method matching path.

/mytestzbk/sayhello

PassThroughAllHeaders

string

Header pass-through type.

Catatan

Pass-through type enumeration values.

  • Pass through all: PASS_ALL

  • No pass-through: PASS_NOT

  • Specified parameters: PASS_ASSIGN

PASS_NOT

PassThroughList

array

Specified Header pass-through list.

string

Specified Header pass-through value.

x-forward

ParamMapsList

array<object>

Parameter mapping list.

object

ExtractKeySpec

string

Input parameter position.

Catatan

Input parameter position enumeration values.

  • Request parameter: ALL_QUERY_PARAMETER

  • Request header: ALL_HEADER

  • URI of the request: ALL_PATH

  • Request body: ALL_BODY

ALL_QUERY_PARAMETER

ExtractKey

string

Input parameter extraction Key.

name

MappingType

string

Backend parameter type.

java.lang.String

DubboServiceGroup

string

Dubbo service group.

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<object>

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<object>

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

Contoh

Respons sukses

JSONformat

{
  "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"
  }
}

Kode kesalahan

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

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.