All Products
Search
Document Center

API Gateway:ListEnvironments

Last Updated:Dec 17, 2025
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.

ListEnvironments

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:ListEnvironmentslist
*Environment
acs:apig:{#regionId}:{#accountId}:environment/*
    none
none

Request syntax

GET /v1/environments HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
nameLikestringNo

Environment name, fuzzy search.

test
aliasLikestringNo

Environment alias, fuzzy search.

测试
gatewayIdstringNo

Gateway ID, exact search.

gw-cptv6ktlhtgnqr73h8d1
gatewayNameLikestringNo

Gateway name, fuzzy search.

test-gw
pageNumberintegerNo

Page number, default is 1.

1
pageSizeintegerNo

Page size, default is 10.

10
resourceGroupIdstringNo

Resource group ID.

rg-aek2sy66mftleiq

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

requestIdstring

Request ID, used for tracing the call chain.

CE857A85-251D-5018-8103-A38957D71E20
codestring

Response code.

Ok
messagestring

Response message.

success
dataobject

Paged query environment list response.

pageNumberinteger

Page number.

1
pageSizeinteger

Number of items per page.

10
totalSizeinteger

Total number of items.

25
itemsarray

List of environment information.

environmentInfoEnvironmentInfo

Environment information.

Examples

Sample success responses

JSONformat

{
  "requestId": "CE857A85-251D-5018-8103-A38957D71E20",
  "code": "Ok",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "pageSize": 10,
    "totalSize": 25,
    "items": [
      {
        "environmentId": "env-cq7l5s5lhtgi6qasrdc0",
        "name": "test",
        "alias": "test-env",
        "description": "This is a test environment.",
        "gatewayInfo": {
          "gatewayId": "gw-cq7og15lhtgi6qasrj60",
          "name": "apitest-gw",
          "vpcInfo": {
            "vpcId": "vpc-uf664nyle5kh***",
            "name": "test-vpc"
          },
          "engineVersion": "2.0.7"
        },
        "subDomainInfos": [
          {
            "domainId": "d-cpudb0llhtgl2djvq2sg",
            "name": "abc.com",
            "protocol": "HTTP",
            "networkType": "Intranet"
          }
        ],
        "default": false,
        "createTimestamp": 1721116090326,
        "updateTimestamp": 1721116090326,
        "resourceGroupId": "rg-xxxx"
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2025-04-25The request parameters of the API has changedView Change Details
2025-01-23The API operation is deprecatedView Change Details
2024-11-20The request parameters of the API has changedView Change Details