首页 ListHttpApiOperations

ListHttpApiOperations

更新时间: 2026-07-01 03:31:15

Retrieves a list of API operations.

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:ListHttpApiOperations

list

*HttpApi

acs:apig:{#regionId}:{#accountId}:httpapi/{#HttpApiId}

None None

Request syntax

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

Path Parameters

Parameter

Type

Required

Description

Example

httpApiId

string

Yes

The ID of the target HTTP API.

api-xxx

Request parameters

Parameter

Type

Required

Description

Example

method

string

No

Lists operations by method.

Valid values:

  • TRACE :

    TRACE

  • HEAD :

    HEAD

  • DELETE :

    DELETE

  • POST :

    POST

  • GET :

    GET

  • CONNECT :

    CONNECT

  • OPTIONS :

    OPTIONS

  • PUT :

    PUT

  • PATCH :

    PATCH

GET

pathLike

string

No

Searches for operations by path prefix.

/v1

nameLike

string

No

Searches for operations by operation name prefix.

GetUser

pageNumber

integer

No

The page number. Pages are numbered starting from 1. Default value: 1.

1

pageSize

integer

No

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

10

name

string

No

Performs an exact search by name.

getUserInfo

withConsumerInEnvironmentId

string

No

Specifies whether to include the authorization rules for a specified consumer and environment in the API response. This parameter is valid only when the withConsumerInfoById parameter is also specified.

env-xxx

withConsumerInfoById

string

No

The response for each API includes a list of authorization rules for a specific consumer in a specific environment when the withConsumerInEnvironmentId parameter is also specified.

cs-xxx

consumerAuthorizationRuleId

string

No

The ID of the consumer authorization rule. This parameter filters the list of operations. The response includes only operations authorized by this rule.

cas-xxx

withPluginAttachmentByPluginId

string

No

The ID of the plugin. This ID is used to retrieve the publication information of the plugin.

pl-xxx

forDeploy

boolean

No

Specifies whether the scenario is for deployment.

true

gatewayId

string

No

The gateway ID filter.

gw-001

enableAuth

boolean

No

Filters operations based on whether authentication is enabled.

true

Response elements

Element

Type

Description

Example

object

The response.

requestId

string

The request ID.

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

code

string

The response status code.

Ok

message

string

The response message.

success

data

object

An array of API operations.

pageNumber

integer

The page number.

1

pageSize

integer

The number of entries per page.

10

totalSize

integer

The total number of entries.

10

items

array

A list of API operations.

HttpApiOperationInfo

The operation information.

Examples

Success response

JSON format

{
  "requestId": "585657D2-1C20-5B8A-AF17-D727C6490BE4",
  "code": "Ok",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "pageSize": 10,
    "totalSize": 10,
    "items": [
      {
        "operationId": "op-xxx",
        "method": "GET",
        "name": "GetUserInfo",
        "path": "/user/123",
        "description": "获取用户信息",
        "response": {
          "contentType": "application/json",
          "items": [
            {
              "code": 200,
              "example": "{\"result\": \"ok\"}",
              "description": "正常接口响应",
              "jsonSchema": "{\n    \"type\": \"object\",\n    \"required\": [\n        \"result\"\n    ],\n    \"properties\": {\n        \"result\": {\n            \"type\": \"string\",\n            \"description\": \"操作结果,'ok' 表示成功\"\n        }\n    }\n}"
            }
          ]
        },
        "request": {
          "headerParameters": [
            {
              "name": "userId",
              "required": true,
              "type": "String",
              "defaultValue": "123",
              "exampleValue": "123",
              "description": "用户ID"
            }
          ],
          "queryParameters": [
            {
              "name": "userId",
              "required": true,
              "type": "String",
              "defaultValue": "123",
              "exampleValue": "123",
              "description": "用户ID"
            }
          ],
          "pathParameters": [
            {
              "name": "userId",
              "required": true,
              "type": "String",
              "defaultValue": "123",
              "exampleValue": "123",
              "description": "用户ID"
            }
          ],
          "body": {
            "description": "body参数描述",
            "example": "{\"result\":\"ok\"}",
            "contentType": "application/json",
            "jsonSchema": "{\n    \"type\": \"object\",\n    \"required\": [\n        \"result\"\n    ],\n    \"properties\": {\n        \"result\": {\n            \"type\": \"string\",\n            \"description\": \"操作结果,'ok' 表示成功\"\n        }\n    }\n}\n"
          }
        },
        "mock": {
          "enable": false,
          "responseCode": 200,
          "responseContent": "Mock测试"
        },
        "createTimestamp": 1719386834548,
        "enableAuth": true,
        "authConfig": {
          "authType": "Jwt",
          "authMode": "NoAuth"
        },
        "status": "Deployed",
        "deployConfigs": [
          {
            "environmentId": "env-xxx",
            "backendScene": "SingleService",
            "autoDeploy": true,
            "gatewayId": "gw-xx",
            "routeBackend": {
              "scene": "Single",
              "services": [
                {
                  "serviceId": "service-cq2bmmdlhtgj***",
                  "name": "item-service",
                  "protocol": "HTTP",
                  "port": 0,
                  "weight": 49,
                  "version": "v1"
                }
              ]
            },
            "gatewayInfo": {
              "gatewayId": "gw-cq7og15lhtgi6qasrj60",
              "name": "apitest-gw",
              "vpcInfo": {
                "vpcId": "vpc-uf664nyle5kh***",
                "name": "商品中心预发环境专有网络"
              },
              "engineVersion": "2.0.7",
              "gatewayEdition": "MultiTenantServerless"
            },
            "mock": {
              "enable": false,
              "responseCode": 200,
              "responseContent": "Mock测试"
            },
            "gatewayType": "API",
            "customDomainIds": [
              "d-xxx"
            ],
            "envDomainIds": [
              "d-xxx"
            ],
            "serviceConfigs": [
              {
                "serviceId": "svc-xxx",
                "weight": 100,
                "modelNamePattern": "qwen-*",
                "modelName": "qwen-max",
                "intentCode": "INQUIRY",
                "match": {
                  "default": true,
                  "conditions": [
                    {
                      "type": "Query",
                      "key": "color",
                      "value": "gray",
                      "operator": "equal"
                    }
                  ]
                },
                "port": 80,
                "protocol": "HTTP",
                "gatewayServiceId": "gw-svc-abc123",
                "name": "Qwen-Max-Service",
                "version": "V2",
                "multiServiceRouteStrategy": "ByWeight",
                "observabilityRouteConfig": {
                  "mode": "LeastBusy",
                  "rateLimit": 0.8,
                  "queueSize": 100
                }
              }
            ],
            "policyConfigs": [
              {}
            ],
            "customDomainInfos": [
              {
                "domainId": "d-cshee6dlhtgk******",
                "name": "hello-server.com",
                "protocol": "HTTP"
              }
            ],
            "envDomainInfos": [
              {
                "domainId": "d-env-xxx",
                "name": "api.example.com",
                "protocol": "HTTPS"
              }
            ],
            "subDomains": [
              {
                "domainId": "d-csmn42um******",
                "name": "test",
                "protocol": "HTTP",
                "networkType": "Intranet"
              }
            ],
            "builtinRouteNames": [
              "[\"chat\",\"completions\"]"
            ]
          }
        ]
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.