All Products
Search
Document Center

API Gateway:ListHttpApiRoutes

Last Updated:Dec 25, 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 the routes of an HTTP API.

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

Request syntax

GET /v1/http-apis/{httpApiId}/routes HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
httpApiIdstringNo

The HTTP API ID.

api-cr68g1dlhtgm31f***
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
environmentIdstringNo

The environment ID.

env-cpqnr6tlhtgubc***
deployStatusesstringNo

The deployment state of the route.

Enumerated values:

  • Deploying: The route is being deployed.
  • DeployedWithChanges: The route is deployed and modified.
  • Undeploying: The route is being undeployed.
  • NotDeployed: The route is not deployed.
  • Deployed: The route is deployed.
  • UndeployFailed: The route failed to be undeployed.
  • DeployFailed: The route failed to be deployed.
NotDeployed
namestringNo

The route name.

itemcenter-gateway
nameLikestringNo

The route name keyword for a fuzzy search.

item
pathLikestringNo

The route path keyword for a fuzzy search.

/v1
gatewayIdstringNo

The ID of the Cloud-native API Gateway instance.

gw-cpv4sqdl****
withConsumerInfoByIdstringNo

The authentication rules of the specified consumer in each route returned.

cs-xxx
consumerAuthorizationRuleIdstringNo

The string that is used to filter routes based on consumer authentication rules. Only authorized APIs are returned.

cas-xxx
withAuthPolicyInfobooleanNo

The consumer authorization information in the response.

true
withPluginAttachmentByPluginIdstringNo

The mounting information of the specified plug-in in each route returned.

pl-xxx
domainIdstringNo

Specifies to filter routes by domain ID.

d-xxx

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

requestIdstring

The request ID.

CBEEB8C1-108E-50F0-9BEA-DED79553C309
codestring

The status code.

Ok
messagestring

The returned message.

success
dataobject

The response parameters.

pageNumberinteger

The page number of the returned page.

1
pageSizeinteger

The number of entries per page.

20
totalSizeinteger

The total number of entries returned.

9
itemsarray

The routes.

HttpRouteHttpRoute

The information about the route.

Examples

Sample success responses

JSONformat

{
  "requestId": "CBEEB8C1-108E-50F0-9BEA-DED79553C309",
  "code": "Ok",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "pageSize": 20,
    "totalSize": 9,
    "items": [
      {
        "routeId": "",
        "name": "",
        "deployStatus": "",
        "description": "",
        "match": {
          "ignoreUriCase": true,
          "path": {
            "type": "Prefix",
            "value": "/user"
          },
          "headers": [
            {
              "type": "Exact",
              "name": "dev",
              "value": true
            }
          ],
          "methods": [
            "GET"
          ],
          "queryParams": [
            {
              "type": "Exact",
              "name": "age",
              "value": 17
            }
          ]
        },
        "backend": {
          "scene": "Single",
          "services": [
            {
              "serviceId": "service-cq2bmmdlhtgj***",
              "name": "item-service",
              "protocol": "HTTP",
              "port": 0,
              "weight": 49,
              "version": "v1"
            }
          ]
        },
        "domainInfos": [
          {
            "domainId": "",
            "name": "",
            "protocol": ""
          }
        ],
        "environmentInfo": {
          "environmentId": "",
          "name": "",
          "alias": "",
          "gatewayInfo": {
            "gatewayId": "",
            "name": ""
          },
          "subDomains": [
            {
              "domainId": "",
              "name": "",
              "protocol": "",
              "networkType": "Internet"
            }
          ]
        },
        "createTimestamp": 0,
        "updateTimestamp": 0
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history