All Products
Search
Document Center

Microservices Engine:ListGatewayRoute

Last Updated:Jun 10, 2026

Mengkueri daftar rute gateway.

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

get

*All Resource

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

PageNumber

integer

No

Nomor halaman.

1

PageSize

integer

No

Jumlah instance yang ditampilkan per halaman (saat ini tidak berlaku, secara default mengkueri semua instance).

10

OrderItem

string

No

Properti pengurutan.

GmtCreate

DescSort

boolean

No

Pengurutan. Bidang ini saat ini tidak tersedia dan akan dihentikan.

false

FilterParams

object

No

Kondisi filter dalam format {"key1":"value1"}

GatewayId

integer

No

ID gateway

81

Name

string

No

Nama rute

test

Status

integer

No

Status rute:

  • Belum dipublikasikan: 0

  • Sedang dipublikasikan: 2

  • Dipublikasikan: 3

  • Sedang diedit (pembaruan belum dipublikasikan): 4

  • Sedang dibatalkan publikasinya: 5

  • Tidak tersedia: 6

3

DefaultServiceId deprecated

integer

No

ID layanan default

1

RouteOrder

integer

No

Urutan (tidak digunakan)

1

DomainId

integer

No

ID domain

284

GatewayUniqueId

string

Yes

ID pengidentifikasi unik gateway

gw-30a0106924c94bca8712ec4e79fc5acc

DomainName

string

No

Domain terkait

*.alites.com

Path

string

No

Jalur rute

/test

AcceptLanguage

string

No

Jenis bahasa untuk informasi yang dikembalikan:

  • zh: Tionghoa

  • en: Inggris

zh

Elemen respons

Element

Type

Description

Example

object

Struktur data.

RequestId

string

ID permintaan.

83F02EAB-ECDF-55C6-B332-8649E5E7AF2C

HttpStatusCode

integer

Kode status HTTP.

200

Message

string

Pesan error.

You are not authorized to perform this operation.

Code

integer

Kode.

200

Success

boolean

Hasil permintaan, dengan nilai-nilai berikut:

  • true: Permintaan berhasil.

  • false: Permintaan gagal.

true

Data

object

Data yang dikembalikan.

TotalSize

integer

Jumlah total entri.

36

PageNumber

integer

Nomor halaman.

11

PageSize

integer

Ukuran halaman.

10

Result

array<object>

Struktur data.

array<object>

Koleksi yang dikembalikan.

Id

integer

Route ID.

47

Name

string

Name.

test

GatewayUniqueId

string

Gateway unique identifier.

gw-cf0e7f52ecc7429dbc7ba4d5e3656100

GatewayId

integer

Gateway ID.

496

Status

integer

Status.

2

RouteOrder

integer

Order

1

DefaultServiceName

string

Default service name.

test

DefaultServiceId

integer

Default service ID.

1

Predicates

string

Matching rules

{\"PathPredicates\":{\"Path\":\"/rpc/compute \",\"Type\":\"PRE\",\"IgnoreCase\":true}}

RoutePredicates

object

Matching rules

PathPredicates

object

Route Path matching.

Path

string

Node path.

/getIp

Type

string

Matching type.

PRE

IgnoreCase

boolean

Ignore case

true

MethodPredicates

array

HTTP method matching

string

Method

GET

HeaderPredicates

array<object>

Header matching

object

Header list

Key

string

Header KEY

userid

Value

string

Matching value

test

Type

string

Matching type

PRE

QueryPredicates

array<object>

Parameter matching

object

Parameter list

Key

string

Parameter name

userid

Value

string

Matching value

test

Type

string

Matching type

PRE

GmtCreate

string

Creation time.

2022-01-25T07:14:01.817+0000

GmtModified

string

Modification time

2022-01-07 18:07:57

Services

string

Service.

[]

RouteServices

array<object>

Service.

array<object>

Service list

ServiceId

integer

Service ID

1563

ServiceName

string

Service name.

hu

Percent

integer

Weight percentage

11

Version

string

Service version.

v1

Name

string

Name.

test

SourceType

string

Source type

MSE

Namespace

string

Namespace.

default

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>

Method mapping body.

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 pass-through Header list.

string

Specified Header pass-through value.

x-forward

ParamMapsList

array<object>

Parameter mapping list.

object

Parameter mapping body.

ExtractKeySpec

string

Input parameter position.

Catatan

Input parameter position enumeration values.

  • Request parameter: ALL_QUERY_PARAMETER

  • Request header: ALL_HEADER

  • Request path: 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

DomainId

integer

Domain ID.

265

DomainName

string

Domain name.

y.com

DestinationType

string

Destination type.

Single

DirectResponse

object

Mock configuration

Code

integer

Response code.

200

Body

string

Mock return value

hello

DomainIdList

array

Domain list.

integer

Domain ID

123

DomainNameList

array

Domain name list.

string

Domain name

test.com

Redirect

object

Redirection

Code

integer

Response code.

200

Host

string

Redirect hostname

test.com

Path

string

Path.

/test

Type

string

Route type

Op

Comment

object

Route comment (ingress)

Status

string

Status.

error

EnableWaf

string

Whether to enable WAF

false

Fallback

boolean

Whether to enable Fallback service.

true

FallbackServices

array<object>

Fallback service.

object

ServiceId

integer

Service ID.

353

ServiceName

string

Service name.

service name

Percent

integer

Weight percentage.

100

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

DynamicRoute

boolean

Whether to enable dynamic routing

Contoh

Respons sukses

JSONformat

{
  "RequestId": "83F02EAB-ECDF-55C6-B332-8649E5E7AF2C",
  "HttpStatusCode": 200,
  "Message": "You are not authorized to perform this operation.",
  "Code": 200,
  "Success": true,
  "Data": {
    "TotalSize": 36,
    "PageNumber": 11,
    "PageSize": 10,
    "Result": [
      {
        "Id": 47,
        "Name": "test",
        "GatewayUniqueId": "gw-cf0e7f52ecc7429dbc7ba4d5e3656100",
        "GatewayId": 496,
        "Status": 2,
        "RouteOrder": 1,
        "DefaultServiceName": "test",
        "DefaultServiceId": 1,
        "Predicates": "{\\\"PathPredicates\\\":{\\\"Path\\\":\\\"/rpc/compute \\\",\\\"Type\\\":\\\"PRE\\\",\\\"IgnoreCase\\\":true}}",
        "RoutePredicates": {
          "PathPredicates": {
            "Path": "/getIp",
            "Type": "PRE",
            "IgnoreCase": true
          },
          "MethodPredicates": [
            "GET"
          ],
          "HeaderPredicates": [
            {
              "Key": "userid",
              "Value": "test",
              "Type": "PRE"
            }
          ],
          "QueryPredicates": [
            {
              "Key": "userid",
              "Value": "test",
              "Type": "PRE"
            }
          ]
        },
        "GmtCreate": "2022-01-25T07:14:01.817+0000",
        "GmtModified": "2022-01-07 18:07:57",
        "Services": "[]",
        "RouteServices": [
          {
            "ServiceId": 1563,
            "ServiceName": "hu",
            "Percent": 11,
            "Version": "v1",
            "Name": "test",
            "SourceType": "MSE",
            "Namespace": "default",
            "GroupName": "api",
            "AgreementType": "DUBBO",
            "HttpDubboTranscoder": {
              "DubboServiceName": "org.apache.dubbo.samples.basic.api.DemoService",
              "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"
            ]
          }
        ],
        "DomainId": 265,
        "DomainName": "y.com",
        "DestinationType": "Single",
        "DirectResponse": {
          "Code": 200,
          "Body": "hello"
        },
        "DomainIdList": [
          123
        ],
        "DomainNameList": [
          "test.com"
        ],
        "Redirect": {
          "Code": 200,
          "Host": "test.com",
          "Path": "/test"
        },
        "Type": "Op",
        "Comment": {
          "Status": "error"
        },
        "EnableWaf": "false",
        "Fallback": true,
        "FallbackServices": [
          {
            "ServiceId": 353,
            "ServiceName": "service name",
            "Percent": 100,
            "Version": "v1",
            "Name": "name",
            "SourceType": "MSE\n",
            "Namespace": "Namespace",
            "GroupName": "test",
            "AgreementType": "DUBBO",
            "ServicePort": 8848
          }
        ],
        "DynamicRoute": true
      }
    ]
  }
}

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.