All Products
Search
Document Center

API Gateway:ListGateways

Last Updated:Feb 05, 2026
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Queries a list of instances.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
apig:ListGatewayslist
*Gateway
acs:apig:{#regionId}:{#accountId}:gateway/*
    none
none

Request syntax

GET /v1/gateways HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
gatewayIdstringNo

Retrieve the list of created cloud-native gateways

gw-cpv4sqdl****
pageNumberintegerNo

The instance ID. If you specify an ID, an exact search is performed.

1
pageSizeintegerNo

The number of the page to return.

10
namestringNo

The number of entries per page.

itemcenter-gateway
keywordstringNo

The instance name. If you specify a name, an exact search is performed.

dev
gatewayTypestringNo

The search keyword. A full match is performed. The search is case-insensitive.

Enumeration Value:
  • AI: The gateway type. Valid values: * AI: AI Gateway * API: API Gateway. .
  • API: The resource group ID. .
API
resourceGroupIdstringNo

rg-aekz3wes3hnre5a

rg-aekzq6bzz5uyg2q
tagarray<object>No

The tags that you want to use for the search.

objectNo

The tag.

keystringNo

The key of tag N.

owner
valuestringNo

The value of tag N.

zhangsan

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

requestIdstring

Schema of Response

5B626361-070A-56A7-B127-ADAC8F3655DB
codestring

The request ID.

Ok
messagestring

The status code.

success
dataobject

The returned message.

pageNumberinteger

The gateway list query result.

1
pageSizeinteger

The page number of the returned page.

10
totalSizelong

The number of entries per page.

6
itemsarray<object>

The total number of entries returned.

gatewayobject

The list of gateways.

gatewayIdstring

The information about a gateway.

gw-cpv54p5***
namestring

The instance ID.

itemcenter-gateway
chargeTypestring

The instance name.

Enumeration Value:
  • PREPAY: The billing method. Valid values: * POSTPAY: pay-as-you-go * PREPAY: subscription .
  • POSTPAY: The gateway type. Valid values: * AI: AI Gateway * API: API Gateway. .
POSTPAY
gatewayTypestring

The instance state. Valid values:

  • Running: The instance is running.
  • Creating: The instance is being created.
  • CreateFailed: The instance fails to be created.
  • Upgrading: The instance is being upgraded.
  • UpgradeFailed: The instance fails to be upgraded.
  • Restarting: The instance is being restarted.
  • RestartFailed: The instance fails to be restarted.
  • Deleting: The instance is being released.
  • DeleteFailed: The instance failed to be released.
Enumeration Value:
  • AI: The instance specification. Valid values: * apigw.small.x1 .
  • API: The node quantity of the instance. .
API
statusstring

The time when the instance was created. This value is a UNIX timestamp. Unit: milliseconds.

Enumeration Value:
  • Restarting: The time when the instance was last updated. This value is a UNIX timestamp. Unit: milliseconds. .
  • Creating: The time when the instance expires. This value is a UNIX timestamp. Unit: milliseconds. .
  • Upgrading: The creation source of the instance. Valid values: * Console .
  • DeleteFailed: The instance version. .
  • Running: The destination version of the instance. If the value is inconsistent with the current version, you can upgrade the instance. .
  • RestartFailed: The ingress addresses of the instance. .
  • Deleting: The ingress address. .
  • CreateFailed: The load balancer ID. .
  • UpgradeFailed: The address type. Valid values: * Internet * Intranet .
Running
specstring

The load balancer type. Valid values:

  • NLB: Network Load Balancer
  • CLB: Classic Load Balancer
Enumeration Value:
  • apigw.small.x1: apigw.small.x1.
apigw.small.x1
replicasstring

The load balancer status. Valid values:

  • Ready: The load balancer is available.
  • NotCreate: The load balancer is not associated with the instance.
2
createTimestamplong

The load balancer IP address.

1719386834548
updateTimestamplong

The IP version of the address. Valid values:

  • ipv4: IPv4
  • ipv6: IPv6
1719386834548
expireTimestamplong

The mode in which the load balancer is provided. Valid values:

  • Managed: Cloud-native API Gateway manages and provides the load balancer.
172086834548
createFromstring

Indicates whether the address is the default ingress address of the instance.

Enumeration Value:
  • Console: The list of listened ports. .
Console
versionstring

The information about the port.

2.0.2
targetVersionstring

The protocol. Valid values:

  • TCP
  • UDP
2.0.2
loadBalancersarray<object>

The port number.

loadBalancerobject

The security group information about the instance.

loadBalancerIdstring

The security group ID.

nlb-xqwioje1c91r***
addressTypestring

sg-xxxx

Enumeration Value:
  • Intranet: The availability zones of the instance. .
  • Internet: The information about the zone. .
Internet
typestring

The zone ID.

Enumeration Value:
  • NLB: cn-hangzhou-f.
  • CLB: The vSwitch information. .
NLB
statusstring

The vSwitch ID.

Enumeration Value:
  • Ready: Ready.
  • NotCreate: NotCreate.
Ready
addressstring

vsw-xxxxx

nlb-xoh3pghr***.cn-hangzhou.nlb.aliyuncs.com
addressIpVersionstring

The vSwitch information.

Enumeration Value:
  • ipv4: ipv4.
  • ipv6: ipv6.
ipv4
modestring

The vSwitch ID.

Enumeration Value:
  • Managed: Managed.
Managed
gatewayDefaultboolean

vsw-xxxxx

true
portsarray<object>

The virtual private cloud (VPC) information of the instance.

portobject

The VPC ID.

protocolstring

vpc-xxxxx

Enumeration Value:
  • TCP: TCP.
  • UDP: UDP.
TCP
portinteger

The resource group ID.

443
ipv4Addressesarray

The IPv4 addresses

ipv4Addressesstring

string

["47.100.100.100"]
ipv6Addressesarray

The IPv6 addresses

ipv6Addressesstring

string

["2408:4000:0:0:0:0:0:1"]
securityGroupobject

rg-xxx

securityGroupIdstring

The tags.

sg-bp1apxihjdbt3***
zonesarray<object>

The tag.

zoneobject

The tag key.

zoneIdstring

The tag value.

cn-hangzhou-i
vSwitchobject

The second-level domain names.

vSwitchIdstring

The second-level domain name.

vsw-bp14efvkcfbrt4***
vSwitchobject

Indicates whether the gateway instance was created before AI Gateway launch.

vSwitchIdstring

List Gateways

vsw-bp14efv***
vpcobject

The VPC information

vpcIdstring

The VPC ID

vpc-uf664ny***
resourceGroupIdstring

The resource group ID

rg-xxxx
tagsarray<object>

The tags

tagobject

object

keystring

The tag key

owner
valuestring

The tag value

zhangsan
subDomainInfosarray

The subdomain information

subDomainInfoSubDomainInfo

SubDomainInfo

legacyboolean

Whether the gateway is a legacy instance

true
gatewayEditionstring

The gateway edition

Serverless

Examples

Sample success responses

JSONformat

{
  "requestId": "5B626361-070A-56A7-B127-ADAC8F3655DB",
  "code": "Ok",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "pageSize": 10,
    "totalSize": 6,
    "items": [
      {
        "gatewayId": "gw-cpv54p5***",
        "name": "itemcenter-gateway",
        "chargeType": "POSTPAY",
        "gatewayType": "API",
        "status": "Running",
        "spec": "apigw.small.x1",
        "replicas": 2,
        "createTimestamp": 1719386834548,
        "updateTimestamp": 1719386834548,
        "expireTimestamp": 172086834548,
        "createFrom": "Console",
        "version": "2.0.2",
        "targetVersion": "2.0.2",
        "loadBalancers": [
          {
            "loadBalancerId": "nlb-xqwioje1c91r***",
            "addressType": "Internet",
            "type": "NLB",
            "status": "Ready",
            "address": "nlb-xoh3pghr***.cn-hangzhou.nlb.aliyuncs.com\n",
            "addressIpVersion": "ipv4",
            "mode": "Managed",
            "gatewayDefault": true,
            "ports": [
              {
                "protocol": "TCP",
                "port": 443
              }
            ],
            "ipv4Addresses": [
              [
                "47.100.100.100"
              ]
            ],
            "ipv6Addresses": [
              [
                "2408:4000:0:0:0:0:0:1"
              ]
            ]
          }
        ],
        "securityGroup": {
          "securityGroupId": "sg-bp1apxihjdbt3***"
        },
        "zones": [
          {
            "zoneId": "cn-hangzhou-i",
            "vSwitch": {
              "vSwitchId": "vsw-bp14efvkcfbrt4***"
            }
          }
        ],
        "vSwitch": {
          "vSwitchId": "vsw-bp14efv***"
        },
        "vpc": {
          "vpcId": "vpc-uf664ny***"
        },
        "resourceGroupId": "rg-xxxx",
        "tags": [
          {
            "key": "owner",
            "value": "zhangsan"
          }
        ],
        "subDomainInfos": [
          {
            "domainId": "",
            "name": "",
            "protocol": "",
            "networkType": ""
          }
        ],
        "legacy": true,
        "gatewayEdition": "Serverless"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-11-25The response structure of the API has changedView Change Details
2025-04-25The response structure of the API has changedView Change Details
2025-04-25The request parameters of the API has changed. The response structure of the API has changedView Change Details
2025-01-22The response structure of the API has changedView Change Details
2024-12-03The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-11-20The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-08-06The response structure of the API has changedView Change Details