All Products
Search
Document Center

API Gateway:ListHttpApis

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.

Queries a list of HTTP APIs.

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:ListHttpApislist
*HttpApi
acs:apig:{#regionId}:{#accountId}:httpapi/*
    none
none

Request syntax

GET /v1/http-apis HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
keywordstringNo

The search keyword. You can fuzzy-search by API name or exact-search by API ID.

test-
pageNumberintegerNo

The page number of the page to return. Pages start from page 1. Default value: 1.

1
pageSizeintegerNo

The number of entries per page. Valid values: 1 to 100. Default value: 10.

10
namestringNo

The API name that is used for the search. In this case, exact search is performed.

login
typesstringNo

The API type. You can specify multiple types and separate them with a comma (,).

  • Http
  • Rest
  • WebSocket
  • HttpIngress
Http,Rest
gatewayIdstringNo

The ID of the Cloud-native API Gateway instance.

gw-cq2avtllh****
withAuthPolicyInEnvironmentIdstringNo

The consumer authentication policy in the specified environment in each returned API.

env-xxx
withConsumerInfoByIdstringNo

The authorization rules of the specified consumer in each returned API.

cs-xxx
withEnvironmentInfobooleanNo

The environment information.

true
withPluginAttachmentByPluginIdstringNo

The plug-in ID. You can use the returned value of this parameter to query the plug-in.

pl-ct9qn3um1hktue8dqol0
resourceGroupIdstringNo

The resource group ID.

rg-ahr5uil8raz0rq3b
withEnvironmentInfoByIdstringNo

The environment ID.

env-ctovu5mm1hksb4q8ln40
withAuthPolicyListbooleanNo

Specifies whether authentication is enabled.

true
withIngressInfobooleanNo

The Ingress information.

false

Response parameters

ParameterTypeDescriptionExample
object

The response body.

requestIdstring

The request ID.

585657D2-1C20-5B8A-AF17-D727C6490BE4
codestring

The status code.

Ok
messagestring

The returned message.

success
dataobject

The APIs.

pageNumberinteger

The page number of the returned page.

1
pageSizeinteger

The number of entries per page.

10
totalSizeinteger

The total number of entries returned.

10
itemsarray

The API information.

apiInfoHttpApiInfoByName

The API information grouped by API name.

Examples

Sample success responses

JSONformat

{
  "requestId": "585657D2-1C20-5B8A-AF17-D727C6490BE4",
  "code": "Ok",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "pageSize": 10,
    "totalSize": 10,
    "items": [
      {
        "name": "test-api",
        "versionEnabled": true,
        "versionedHttpApis": [
          {
            "httpApiId": "api-xxx",
            "name": "test",
            "protocols": [
              "HTTP"
            ],
            "basePath": "/v1",
            "description": "for test only",
            "versionInfo": {
              "enable": true,
              "scheme": "Query",
              "headerName": "my-version",
              "queryName": "myVersion",
              "version": "v1"
            },
            "environments": [
              {
                "environmentId": "env-xxx",
                "backendScene": "SingleService",
                "backendType": "Service",
                "serviceConfigs": [
                  {
                    "gatewayServiceId": "gs-xxx",
                    "name": "demo-service",
                    "protocol": "HTTP",
                    "port": 8080,
                    "weight": 100,
                    "version": "v1",
                    "match": {
                      "default": true,
                      "conditions": [
                        {
                          "type": "Query",
                          "key": "color",
                          "value": "gray",
                          "operator": "equal"
                        }
                      ]
                    },
                    "serviceId": "svc-xxx"
                  }
                ],
                "customDomains": [
                  {
                    "domainId": "d-xxx",
                    "name": "www.example.com",
                    "protocol": "HTTP"
                  }
                ],
                "name": "test",
                "alias": "test",
                "gatewayInfo": {
                  "gatewayId": "gw-xxx",
                  "name": "test"
                },
                "deployStatus": "Deployed",
                "subDomains": [
                  {
                    "domainId": "d-xxx",
                    "name": "www.example.com",
                    "protocol": "HTTP",
                    "networkType": "Internet"
                  }
                ]
              }
            ],
            "ingressInfo": {
              "sourceId": "src-xxx",
              "ingressClass": "mse",
              "watchNamespace": "default",
              "environmentInfo": {
                "environmentId": "env-xxx"
              },
              "k8sClusterInfo": {
                "clusterId": "ca435c77cba1547cca9311957bcxxxxxx"
              },
              "overrideIngressIp": true
            },
            "type": "Rest",
            "resourceGroupId": "rg-xxx",
            "aiProtocols": [
              "OpenAI/v1"
            ],
            "deployConfigs": [
              {
                "customDomainIds": [
                  "d-xxx"
                ],
                "environmentId": "env-xxx",
                "backendScene": "SingleService",
                "serviceConfigs": [
                  {
                    "serviceId": "svc-xxx",
                    "weight": 100,
                    "modelNamePattern": "qwen-*",
                    "modelName": "qwen-max"
                  }
                ],
                "policyConfigs": [
                  {
                    "type": "AiFallback",
                    "enable": true,
                    "aiFallbackConfig": {
                      "serviceIds": [
                        "svc-xxx"
                      ]
                    }
                  }
                ],
                "autoDeploy": true
              }
            ],
            "enabelAuth": true,
            "authConfig": {
              "authType": "Jwt",
              "authMode": "NoAuth"
            }
          }
        ],
        "type": "Http"
      }
    ]
  }
}

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-03-31The request parameters of the API has changedView Change Details
2024-12-26The request parameters of the API has changedView Change Details
2024-11-28The request parameters of the API has changedView Change Details
2024-11-20The request parameters of the API has changedView Change Details
2024-11-18The request parameters of the API has changedView Change Details
2024-10-24The request parameters of the API has changedView Change Details
2024-09-11The request parameters of the API has changedView Change Details
2024-09-06The request parameters of the API has changedView Change Details
2024-08-05The request parameters of the API has changedView Change Details
2024-07-26The request parameters of the API has changedView Change Details