ListHttpApiOperations
Retrieves a list of API operations.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apig:ListHttpApiOperations |
list |
*HttpApi
|
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:
|
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.