Todos os produtos
Search
Central de documentação

Microservices Engine:ListGatewayRoute

Última atualização: Jul 03, 2026

Consulta a lista de rotas do gateway.

Experimente agora

Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.

Testar

Autorização RAM

A tabela abaixo descreve a autorização necessária para chamar esta API. Você pode defini-la em uma política do Resource Access Management (RAM). As colunas da tabela estão detalhadas abaixo:

  • Ação: As ações que podem ser usadas no elemento Action das instruções de política de permissão do RAM para conceder permissões para executar a operação.

  • API: A API que você pode chamar para executar a ação.

  • Nível de acesso: O nível de acesso predefinido concedido para cada API. Valores válidos: create, list, get, update e delete.

  • Tipo de recurso: O tipo de recurso que suporta autorização para executar a ação. Indica se a ação suporta permissão em nível de recurso. O recurso especificado deve ser compatível com a ação. Caso contrário, a política será ineficaz.

    • Para APIs com permissões em nível de recurso, os tipos de recursos obrigatórios são marcados com um asterisco (*). Especifique o Nome de Recurso Alibaba Cloud (ARN) correspondente no elemento Resource da política.

    • Para APIs sem permissões em nível de recurso, é exibido como Todos os Recursos. Use um asterisco (*) no elemento Resource da política.

  • Chave de condição: As chaves de condição definidas pelo serviço. A chave permite controle granular, aplicando-se somente a ações ou a ações associadas a recursos específicos. Além das chaves de condição específicas do serviço, o Alibaba Cloud fornece um conjunto de chaves de condição comuns aplicáveis a todos os serviços compatíveis com RAM.

  • Ação dependente: As ações dependentes necessárias para executar a ação. Para concluir a ação, o usuário RAM ou a função RAM deve ter permissões para executar todas as ações dependentes.

Ação

Nível de acesso

Tipo de recurso

Chave de condição

Ação dependente

mse:ListGatewayRoute

get

*All Resource

*

Nenhuma Nenhuma

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

PageNumber

integer

Não

O número da página.

1

PageSize

integer

Não

O número de instâncias exibidas por página (atualmente sem efeito, consulta todas as instâncias por padrão).

10

OrderItem

string

Não

A propriedade de ordenação.

GmtCreate

DescSort

boolean

Não

A ordenação. Este campo está atualmente indisponível e sendo descontinuado.

false

FilterParams

object

Não

As condições de filtro no formato {"key1":"value1"}.

GatewayId

integer

Não

O ID do gateway.

81

Name

string

Não

O nome da rota.

test

Status

integer

Não

O status da rota:

  • Unpublished: 0

  • Publishing: 2

  • Published: 3

  • Editing (updates not published): 4

  • Unpublishing: 5

  • Unavailable: 6

3

DefaultServiceId deprecated

integer

Não

O ID do serviço padrão.

1

RouteOrder

integer

Não

A ordem (não utilizada).

1

DomainId

integer

Não

O ID do domínio.

284

GatewayUniqueId

string

Sim

O ID do identificador exclusivo do gateway.

gw-30a0106924c94bca8712ec4e79fc5acc

DomainName

string

Não

O domínio associado.

*.alites.com

Path

string

Não

O caminho da rota.

/test

AcceptLanguage

string

Não

O tipo de idioma para as informações retornadas:

  • zh: Chinês

  • en: Inglês

zh

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

A estrutura de dados.

RequestId

string

O ID da solicitação.

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

HttpStatusCode

integer

O código de status HTTP.

200

Message

string

A mensagem de erro.

You are not authorized to perform this operation.

Code

integer

O código.

200

Success

boolean

O resultado da solicitação, com os seguintes valores:

  • true: A solicitação foi bem-sucedida.

  • false: A solicitação falhou.

true

Data

object

Os dados retornados.

TotalSize

integer

O número total de entradas.

36

PageNumber

integer

O número da página.

11

PageSize

integer

O tamanho da página.

10

Result

array<object>

A estrutura de dados.

array<object>

A coleção de retorno.

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

Case insensitive

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.

Nota

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.

Nota

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.

Nota

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

Extract key from input.

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

Exemplos

Resposta de sucesso

JSON formato

{
  "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": false
      }
    ]
  }
}

Códigos de erro

Código de status HTTP

Código de erro

Mensagem de erro

Descrição

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

Consulte Códigos de Erro para uma lista completa.

Notas de versão

Consulte Notas de Versão para uma lista completa.