All Products
Search
Document Center

Microservices Engine:ListGatewayService

Last Updated:Apr 20, 2026

Retrieves the list of services to which a gateway is subscribed.

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 supports 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:ListGatewayService

get

*Gateway

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

None None

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries per page.

10

OrderItem

string

No

The sorting property.

GmtCreate

DescSort

boolean

No

Indicates whether to sort the results in descending order.

false

FilterParams

object

No

The filter conditions, specified as a JSON string, such as {"key1":"value1"}.

Name

string

No

The service name.

test

SourceType

string

No

The source type.

MSE

Namespace

string

No

The namespace.

public

GroupName

string

No

The group.

test

GatewayUniqueId

string

Yes

The unique gateway ID.

gw-5017305290e14centbrveca****

ServiceProtocol

string

No

The service protocol.

  • HTTP

  • HTTPS

  • HTTP2

  • GRPC

  • DUBBO

Valid values:

  • HTTP2 :

    HTTP2

  • HTTPS :

    HTTPS

  • HTTP :

    HTTP

  • DUBBO :

    DUBBO

  • GRPC :

    GRPC

HTTP

AcceptLanguage

string

No

The response language. Valid values:

  • zh: Chinese

  • en: English

zh

Response elements

Element

Type

Description

Example

object

The data structure.

RequestId

string

The request ID.

F46CDBA4-B1EE-5C94-8A48-51C10177****

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The response message.

You are not authorized to perform this operation.

Code

integer

The response code.

200

Success

boolean

Specifies whether the request succeeded. Valid values:

  • true: The request succeeded.

  • false: The request failed.

true

Data

object

The response data.

TotalSize

integer

The total number of entries.

9

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page. Default value: 10.

10

Result

array<object>

The list of services.

array<object>

The details of a service.

Id

integer

The ID of the service.

1

Name

string

The service name.

test

GatewayUniqueId

string

The unique ID of the gateway.

gw-5017305290e14centbrveca****

GatewayId

integer

The gateway ID.

1

SourceType

string

The source type.

MSE

Namespace

string

The namespace.

public

GroupName

string

The group name.

test

SourceId

integer

The source ID.

2

ServiceNameInRegistry

string

The original service name in the service registry.

test

MetaInfo

string

The service metadata.

{}

Ips

array

A list of the service's IP addresses.

string

An IP address of the service.

127.0.2.1

GmtCreate

string

The time when the service was created.

2022-01-07 18:07:57

GmtModified

string

The time when the service was last modified.

2022-01-07 18:07:57

Versions

array<object>

A list of service versions.

object

A service version.

Name

string

The version name.

v1

ServiceProtocol

string

The service protocol.

HTTP

ServicePort

integer

The service port.

80

HealehStatus

string

The health status of the service. Valid values:

  • Health

  • Unhealthy

  • Unknown

Unhealthy

HealthStatus

string

The health status of the service. Valid values:

  • Health

  • Unhealthy

  • Unknown

Unhealthy

HealthCheck

boolean

Specifies whether to perform a health check.

true

HealthCheckInfo

object

The health check configuration.

Check

boolean

Specifies whether to enable the health check.

true

Protocol

string

The protocol for the health check.

TCP

Timeout

integer

The timeout for the health check, in seconds.

2

Interval

integer

The interval between health checks, in seconds.

2

HealthyThreshold

integer

The number of consecutive successful health checks required for an endpoint to be considered healthy.

2

UnhealthyThreshold

integer

The number of consecutive failed health checks required for an endpoint to be considered unhealthy.

2

HttpPath

string

The HTTP path for the health check.

/health

HttpHost

string

The host for the health check HTTP request.

http://172.168.0.1

ExpectedStatuses

array

A list of expected HTTP status codes that indicate a successful health check.

integer

An expected HTTP status code.

200

UnhealthyEndpoints

array

A list of unhealthy endpoints.

string

An unhealthy endpoint.

172.168.0.1

GatewayTrafficPolicy

object

The traffic management policy.

Tls

object

The Transport Layer Security (TLS) settings.

Mode

string

The TLS mode.

  • DISABLE

  • SIMPLE

  • MUTUAL

  • ISTIO_MUTUAL

SIMPLE

CertId

string

The certificate ID.

5******-cn-hangzhou

CaCertId

string

The ID of the CA certificate.

5******-cn-hangzhou

CaCertContent

string

The public key of the CA certificate.

content

SubjectAltNames

array

A list of subject alternative names (SANs).

string

A subject alternative name.

name

Sni

string

The Server Name Indication (SNI).

name-sni

LoadBalancerSettings

object

The load balancing settings.

LoadbalancerType

string

The load balancing policy.

  • ROUND_ROBIN

  • LEAST_CONN

  • RANDOM

  • CONSISTENT_HASH

RANDOM

ConsistentHashLBConfig

object

Configuration for cookie-based consistent hashing.

ParameterName

string

The name of the parameter used for the consistent hash.

param

HttpCookie

object

Configuration for cookie-based consistent hashing.

Name

string

The name of the cookie.

name

Path

string

The path of the cookie.

/path

Ttl

string

The time to live (TTL) of the cookie.

360

MinimumRingSize

integer

The minimum size of the hash ring.

10000

ConsistentHashLBType

string

The consistent hash method.

  • HEADER

  • COOKIE

  • SOURCE_IP

  • QUERY_PARAMETER

HEADER

WarmupDuration

integer

The warm-up duration in seconds. During this period, traffic to a newly added endpoint gradually increases.

10

Ports

array

A list of service ports.

integer

A service port number.

8080

ServiceFQDN

string

The fully qualified domain name (FQDN) of the service.

DnsServerList

array

A list of DNS servers. This parameter is used only for DNS-based services.

string

A DNS server address in the IP address:Port format.

1.1.1.1:80

Examples

Success response

JSON format

{
  "RequestId": "F46CDBA4-B1EE-5C94-8A48-51C10177****",
  "HttpStatusCode": 200,
  "Message": "You are not authorized to perform this operation.",
  "Code": 200,
  "Success": true,
  "Data": {
    "TotalSize": 9,
    "PageNumber": 1,
    "PageSize": 10,
    "Result": [
      {
        "Id": 1,
        "Name": "test",
        "GatewayUniqueId": "gw-5017305290e14centbrveca****",
        "GatewayId": 1,
        "SourceType": "MSE",
        "Namespace": "public",
        "GroupName": "test",
        "SourceId": 2,
        "ServiceNameInRegistry": "test",
        "MetaInfo": "{}",
        "Ips": [
          "127.0.2.1"
        ],
        "GmtCreate": "2022-01-07 18:07:57",
        "GmtModified": "2022-01-07 18:07:57",
        "Versions": [
          {
            "Name": "v1"
          }
        ],
        "ServiceProtocol": "HTTP",
        "ServicePort": 80,
        "HealehStatus": "Unhealthy",
        "HealthStatus": "Unhealthy",
        "HealthCheck": true,
        "HealthCheckInfo": {
          "Check": true,
          "Protocol": "TCP",
          "Timeout": 2,
          "Interval": 2,
          "HealthyThreshold": 2,
          "UnhealthyThreshold": 2,
          "HttpPath": "/health",
          "HttpHost": "http://172.168.0.1",
          "ExpectedStatuses": [
            200
          ]
        },
        "UnhealthyEndpoints": [
          "172.168.0.1"
        ],
        "GatewayTrafficPolicy": {
          "Tls": {
            "Mode": "SIMPLE",
            "CertId": "5******-cn-hangzhou",
            "CaCertId": "5******-cn-hangzhou",
            "CaCertContent": "content",
            "SubjectAltNames": [
              "name"
            ],
            "Sni": "name-sni"
          },
          "LoadBalancerSettings": {
            "LoadbalancerType": "RANDOM",
            "ConsistentHashLBConfig": {
              "ParameterName": "param",
              "HttpCookie": {
                "Name": "name",
                "Path": "/path",
                "Ttl": "360"
              },
              "MinimumRingSize": 10000,
              "ConsistentHashLBType": "HEADER"
            },
            "WarmupDuration": 10
          }
        },
        "Ports": [
          8080
        ],
        "ServiceFQDN": "",
        "DnsServerList": [
          "1.1.1.1:80"
        ]
      }
    ]
  }
}

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.