查询API列表
功能介绍
查看API列表,返回API详细信息、发布信息等,但不能查看到后端服务信息。
URI
HTTP/HTTPS请求方法以及URI如下表所示。
请求方法 | URI |
|---|---|
GET | /v1.0/apigw/apis[?page_size, page_no, id, name, group_id, req_protocol, req_method, req_uri, auth_type, env_id, type,status, tags] |

- 可以在URI后面用‘?’和‘&’添加不同的查询条件组合。
- 查询条件可为以下字段以及对应的值:id、name、group_id、req_protocol、req_method、req_uri、auth_type、env_id、type、status、tags、page_size、page_no。
请求消息
名称 | 是否必选 | 类型 | 说明 |
|---|---|---|---|
id | 否 | String | API的编号 |
name | 否 | String | API的名称 |
group_id | 否 | String | API所属分组编号 |
req_protocol | 否 | String | 请求协议 |
req_method | 否 | String | 请求方法 |
req_uri | 否 | String | 请求路径 |
auth_type | 否 | String | 授权类型 |
env_id | 否 | String | 发布的环境编号 |
type | 否 | Integer | API类型 |
page_size | 否 | Integer | 每页显示的条数,默认值:20,最大值500。page_size值为0时,返回所有API。 |
page_no | 否 | Integer | 页码,默认值:1 |
precise_search | 否 | String | 指定需要精确匹配查找的参数名称,目前仅支持name、req_uri |
响应消息
名称 | 类型 | 说明 |
|---|---|---|
total | Integer | 符合条件的API总数 |
size | Integer | 本次查询返回的列表长度 |
apis | 字典数据类型 | 本次查询到的API列表 |
参数 | 类型 | 说明 |
|---|---|---|
id | String | API编号 |
name | String | API名称 |
group_id | String | API所属分组的编号 |
group_name | String | API所属分组的名称 |
status | Integer | API的状态 |
type | Integer | API类型 |
version | String | API版本 |
req_protocol | String | API访问协议 |
req_method | String | API请求方式 |
req_uri | String | API访问地址 |
auth_type | String | API认证方式 |
auth_opt | 字段数据类型 | API认证方式参数 |
authorizer_id | String | 前端自定义认证对象的ID |
match_mode | String | API匹配方式 |
register_time | Timestamp | API创建时间 |
update_time | Timestamp | API修改时间 |
remark | String | API描述 |
bakend_type | String | 后端类型 |
run_env_name | String | 发布的环境名 |
run_env_id | String | 发布的环境id |
publish_id | String | 发布记录的编号 |
arrange_necessary | Integer | 是否需要编排 |
cors | Bool | 是否支持跨域访问 |
tag | String | 服务名称标签,待废弃字段 |
tags | []String | 标签 |
response_id | String | 分组自定义响应ID |
参数 | 类型 | 说明 |
|---|---|---|
app_code_auth_type | String | AppCode简易认证类型 |
响应消息样例:
{
"total": 3,
"size": 3,
"apis": [
{
"name": "test",
"type": 1,
"version": "V0.0.1",
"req_protocol": "HTTPS",
"req_method": "GET",
"req_uri": "/test/{project_id}",
"auth_type": "APP",
"auth_opt": {
"app_code_auth_type": "DISABLE"
},
"tags": ["APIG-SN-test", "test"],
"cors": false,
"match_mode": "NORMAL",
"backend_type": "HTTP",
"group_id": "f71f69876f90456ca6fd18ed012fdc11",
"id": "81efcfd94b8747a0b21e8c04144a4e8c",
"status": 1,
"arrange_necessary": 2,
"register_time": "2018-08-15T03:41:11Z",
"update_time": "2018-08-15T03:41:11Z",
"group_name": "group0002"
},
{
"name": "bbbbb",
"type": 1,
"version": "0.0.1",
"req_protocol": "HTTPS",
"req_method": "GET",
"req_uri": "/test002",
"auth_type": "APP",
"auth_opt": {
"app_code_auth_type": "DISABLE"
},
"tags": ["APIG-SN-test", "test"],
"cors": false,
"match_mode": "NORMAL",
"backend_type": "MOCK",
"remark": "aaa",
"group_id": "70f1b578da9b4dfe889b4c33d1b995c2",
"id": "91c26288acea4448be205265d77dae22",
"status": 1,
"arrange_necessary": 2,
"register_time": "2018-07-27T11:54:24Z",
"update_time": "2018-07-27T11:54:24Z",
"group_name": "test001",
"run_env_name": "RELEASE",
"run_env_id": "DEFAULT_ENVIRONMENT_RELEASE_ID",
"publish_id": "a6e06a00c382436eb524fa2dd343cb6d"
},
{
"name": "aaa",
"type": 1,
"version": "0.0.1",
"req_protocol": "HTTPS",
"req_method": "GET",
"req_uri": "/test001",
"auth_type": "APP",
"auth_opt": {
"app_code_auth_type": "DISABLE"
},
"tags": ["APIG-SN-test", "test"],
"cors": false,
"match_mode": "NORMAL",
"backend_type": "MOCK",
"remark": "aaa",
"group_id": "70f1b578da9b4dfe889b4c33d1b995c2",
"id": "aebacac6095942b4b2dd2b209bb7b9bc",
"status": 1,
"arrange_necessary": 2,
"register_time": "2018-07-27T11:23:34Z",
"update_time": "2018-07-27T11:23:34Z",
"group_name": "test001",
"run_env_name": "RELEASE",
"run_env_id": "DEFAULT_ENVIRONMENT_RELEASE_ID",
"publish_id": "1bc8b2b741a04bd4af3ef9d7cd003104"
}
]
} 状态码
状态码 | 说明 |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
500 | Server Internal Error |

