All Products
Search
Document Center

API Gateway:ListGateways

Last Updated:Jul 08, 2026

Queries a list of gateways.

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

apig:ListGateways

list

*Gateway

acs:apig:{#regionId}:{#accountId}:gateway/*

None None

Request syntax

GET /v1/gateways HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

gatewayId

string

No

The gateway ID for exact match query.

gw-cpv4sqdl****

pageNumber

integer

No

The page number.

1

pageSize

integer

No

The page size.

10

name

string

No

The gateway name for exact match query.

itemcenter-gateway

keyword

string

No

The keyword for full match search. Case-insensitive.

dev

gatewayType

string

No

The gateway type.

Valid values:

  • AI :

    AI gateway.

  • API :

    API gateway.

API

resourceGroupId

string

No

The resource group.

rg-aekzq6bzz5uyg2q

tag

array<object>

No

The list of tags.

object

No

The tag.

key

string

No

The tag key.

owner

value

string

No

The tag value.

zhangsan

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

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

code

string

The response status code.

Ok

message

string

The response message.

success

data

object

The query result of the gateway list.

pageNumber

integer

The page number.

1

pageSize

integer

The page size.

10

totalSize

integer

The total number of gateways.

6

items

array<object>

The gateway list.

array<object>

The gateway information.

gatewayId

string

The gateway ID.

gw-cpv54p5***

name

string

The gateway name.

itemcenter-gateway

chargeType

string

The billing type. Valid values:

  • POSTPAY: Pay-as-you-go.

  • PREPAY: Subscription.

Valid values:

  • PREPAY :

    Subscription.

  • POSTPAY :

    Pay-as-you-go.

POSTPAY

gatewayType

string

The gateway type.

Valid values:

  • AI :

    AI gateway.

  • API :

    API gateway.

API

status

string

The gateway status. Valid values:

  • Running: The gateway is running.

  • Creating: The gateway is being created.

  • CreateFailed: The gateway failed to be created.

  • Upgrading: The gateway is being upgraded.

  • UpgradeFailed: The gateway failed to be upgraded.

  • Restarting: The gateway is being restarted.

  • RestartFailed: The gateway failed to be restarted.

  • Deleting: The gateway is being released.

  • DeleteFailed: The gateway failed to be released.

Valid values:

  • Restarting :

    Restarting.

  • Creating :

    Creating.

  • Upgrading :

    Upgrading.

  • DeleteFailed :

    Release failed.

  • Running :

    Running.

  • RestartFailed :

    Restart failed.

  • Deleting :

    Releasing.

  • CreateFailed :

    Creation failed.

  • UpgradeFailed :

    Upgrade failed.

Running

spec

string

The gateway specification. Valid values:

  • apigw.small.x1: small specification.

Valid values:

  • apigw.small.x1 :

    apigw.small.x1

apigw.small.x1

replicas

string

The number of gateway instance nodes.

2

createTimestamp

integer

The creation timestamp, in milliseconds.

1719386834548

updateTimestamp

integer

The update timestamp, in milliseconds.

1719386834548

expireTimestamp

integer

The subscription expiration timestamp, in milliseconds.

172086834548

createFrom

string

The source from which the gateway was created. Valid values:

  • Console: The gateway was created from the console.

Valid values:

  • Console :

    Console.

Console

version

string

The gateway version.

2.0.2

targetVersion

string

The target version of the gateway. When this value differs from version, a version upgrade can be performed.

2.0.2

loadBalancers

array<object>

The list of gateway entry addresses.

array<object>

The gateway entry address information.

loadBalancerId

string

The load balancing instance ID.

nlb-xqwioje1c91r***

addressType

string

The load balancing address type. Valid values:

  • Internet: public network.

  • Intranet: private network.

Valid values:

  • Intranet :

    Private network.

  • Internet :

    Public network.

Internet

type

string

The load balancing type of the gateway. Valid values:

  • NLB: Network load balancing.

  • CLB: Classic load balancing.

Valid values:

  • NLB :

    Network load balancing

  • CLB :

    Classic load balancing

NLB

status

string

The load balancing status. Valid values:

  • Ready: Active.

  • NotCreate: No associated instance.

Valid values:

  • Ready :

    Ready

  • NotCreate :

    NotCreate

Ready

address

string

The load balancing address.

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

addressIpVersion

string

The protocol version. Valid values:

  • ipv4: IPv4.

  • ipv6: IPv6.

Valid values:

  • ipv4 :

    ipv4

  • ipv6 :

    ipv6

ipv4

mode

string

The load balancing provisioning pattern of the gateway. Valid values:

  • Managed: Managed by Cloud-native API Gateway.

Valid values:

  • Managed :

    Managed

Managed

gatewayDefault

boolean

Indicates whether this is the default entry address of the gateway.

true

ports

array<object>

The list of listening ports.

object

The listening port information.

protocol

string

The protocol. Valid values:

  • TCP

  • UDP

Valid values:

  • TCP :

    TCP

  • UDP :

    UDP

TCP

port

integer

The port number.

443

ipv4Addresses

array

The list of IPv4 addresses.

string

The parameter.

["47.100.100.100"]

ipv6Addresses

array

The list of IPv6 addresses.

string

The parameter.

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

securityGroup

object

The security group information of the gateway.

securityGroupId

string

The security group ID.

sg-bp1apxihjdbt3***

zones

array<object>

The zone information of the gateway.

array<object>

The zone information.

zoneId

string

The zone ID.

cn-hangzhou-i

vSwitch

object

The vSwitch.

vSwitchId

string

The vSwitch ID.

vsw-bp14efvkcfbrt4***

vSwitch

object

The vSwitch information.

vSwitchId

string

The vSwitch ID.

vsw-bp14efv***

vpc

object

The VPC information of the gateway.

vpcId

string

The VPC ID.

vpc-uf664ny***

resourceGroupId

string

The resource group ID.

rg-xxxx

tags

array<object>

The list of tags.

object

The tag.

key

string

The tag key.

owner

value

string

The tag value.

zhangsan

subDomainInfos

array

The list of second-level domain names.

SubDomainInfo

The second-level domain name information.

legacy

boolean

Indicates whether the gateway instance was created before the AI gateway feature was launched.

true

gatewayEdition

string

The gateway instance edition. Valid values:

  • Professional: Standard instance.

  • Serverless: Serverless instance.

Serverless

Examples

Success response

JSON format

{
  "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": "d-cpudb0llhtgl2djvq2sg",
            "name": "abc.com",
            "protocol": "HTTP",
            "networkType": "Intranet"
          }
        ],
        "legacy": true,
        "gatewayEdition": "Serverless"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.