查询分组列表 - ListApiGroupsV2
功能介绍
查询API分组列表。
如果是租户操作,则查询该租户下所有的分组;如果是管理员权限账号操作,则查询的是所有租户的分组。
调用方法
请参见如何调用API。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,需具备如下身份策略权限。
授权项
访问级别
资源类型(*为必须)
条件键
别名
依赖的授权项
apig:apiGroup:list
List
instance *
g:ResourceTag/<tag-key>
- apig:groups:list
apig:instance:get
URI
GET /v2/{project_id}/apigw/instances/{instance_id}/api-groups
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID,获取方式请参见获取项目ID。 |
instance_id | 是 | String | 实例ID,在API网关控制台的“实例信息”中获取。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
offset | 否 | Long | 偏移量,表示从此偏移量开始查询,偏移量小于0时,自动转换为0 缺省值:0 |
limit | 否 | Integer | 每页显示的条目数量,条目数量小于等于0时,自动转换为20,条目数量大于500时,自动转换为500 最小值:1 最大值:500 缺省值:20 |
id | 否 | String | API分组编号 |
name | 否 | String | API分组名称 |
precise_search | 否 | String | 指定需要精确匹配查找的参数名称,目前仅支持API分组名称 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
size | Integer | 本次返回的列表长度 |
total | Long | 满足条件的记录数 |
groups | Array of ApiGroupInfo objects | 分组列表 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 编号 |
name | String | API分组名称 |
status | Integer | 状态
|
sl_domain | String | 系统默认分配的子域名 |
register_time | String | 创建时间 |
update_time | String | 最近修改时间 |
on_sell_status | Integer | 是否已上架云商店:
暂不支持 |
url_domains | Array of UrlDomain objects | 分组上绑定的独立域名列表 |
sl_domain_access_enabled | Boolean | 调试域名是否可以访问,true表示可以访问,false表示禁止访问 缺省值:true |
sl_domains | Array of strings | 系统默认分配的子域名列表 |
remark | String | 描述 |
call_limits | Integer | 流控时长内分组下的API的总访问次数限制,默认不限,请根据服务的负载能力自行设置 暂不支持 |
time_interval | Integer | 流控时长 暂不支持 |
time_unit | String | 流控的时间单位 暂不支持 |
is_default | Integer | 是否为默认分组 |
version | String | 分组版本。
暂不支持。 |
roma_app_id | String | 分组归属的集成应用编号。 分组版本V2时必填。 暂不支持 |
roma_app_name | String | 分组归属的集成应用名称 暂不支持 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 域名编号 |
domain | String | 访问域名 |
cname_status | Integer | 域名cname状态:
|
ssl_id | String | SSL证书编号。当绑定的证书有RSA类型时,该字段有值,且展示对应RSA证书的编号。 |
ssl_name | String | SSL证书名称。当绑定的证书有RSA类型时,该字段有值,且展示对应RSA证书的名称。 |
min_ssl_version | String | 最小ssl协议版本号。支持TLSv1.1或TLSv1.2 缺省值:TLSv1.1 |
verified_client_certificate_enabled | Boolean | 是否开启客户端证书校验。只有绑定证书时,该参数才生效。当绑定证书存在trusted_root_ca时,默认开启;当绑定证书不存在trusted_root_ca时,默认关闭。 缺省值:false |
is_has_trusted_root_ca | Boolean | 是否存在信任的根证书CA。只有当域名绑定的所有证书都存在信任的根证书CA时为true。 缺省值:false |
ingress_http_port | Integer | 访问该域名绑定的http协议入方向端口,-1表示无端口且协议不支持,可使用80默认端口,其他有效端口允许的取值范围为1024~49151,需为实例已开放的HTTP协议的自定义入方向端口。 当创建域名时,该参数未填表示用默认80端口;如果填写该参数,则必须同时填写https_port;如果要http_port和https_port同时使用默认端口,则两个参数都不填。 当修改域名时,该参数未填表示不修改该端口。 最小值:-1 最大值:49151 |
ingress_https_port | Integer | 访问该域名绑定的https协议入方向端口,-1表示无端口且协议不支持,可使用443默认端口,其他有效端口允许的取值范围为1024~49151,需为实例已开放的HTTPS协议的自定义入方向端口。 当创建域名时,该参数未填表示用默认443端口;如果填写该参数,则必须同时填写http_port;如果要http_port和https_port同时使用默认端口,则两个参数都不填。 当修改域名时,该参数未填表示不修改该端口。 最小值:-1 最大值:49151 |
ssl_infos | Array of SslInfo objects | SSL证书列表。 |
参数 | 参数类型 | 描述 |
|---|---|---|
ssl_id | String | SSL证书编号。 |
ssl_name | String | SSL证书名称。 |
algorithm_type | String | 证书算法类型:
|
type | Integer | 证书可见范围:
缺省值:2 |
is_has_trusted_root_ca | Boolean | 是否存在信任的根证书CA。当绑定证书存在trusted_root_ca时为true。 缺省值:false |
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码 |
error_msg | String | 错误描述 |
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码 |
error_msg | String | 错误描述 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码 |
error_msg | String | 错误描述 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码 |
error_msg | String | 错误描述 |
请求示例
无
响应示例
状态码:200
OK
{
"total" : 2,
"size" : 2,
"groups" : [ {
"update_time" : "2020-07-31T06:55:55Z",
"name" : "api_group_001",
"on_sell_status" : 2,
"remark" : "API group 1",
"sl_domains" : [ "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.cn" ],
"sl_domain" : "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com",
"id" : "c77f5e81d9cb4424bf704ef2b0ac7600",
"register_time" : "2020-07-31T06:55:55Z",
"status" : 1,
"is_default" : 2,
"sl_domain_access_enabled" : true,
"url_domains" : [ {
"id" : "e91b83b07744e8eb1872d695ed4743b",
"domain" : "test.com",
"ssl_id" : "ddsa83b07744e8eb1872d695ed4743b",
"ssl_name" : "cert_RSA",
"is_has_trusted_root_ca" : false,
"ssl_infos" : [ {
"ssl_id" : "ddsa83b07744e8eb1872d695ed4743b",
"ssl_name" : "cert_RSA",
"algorithm_type" : "RSA",
"type" : 2,
"is_has_trusted_root_ca" : true
}, {
"ssl_id" : "767d93f1b78840bdb9a8e7d46450c64a",
"ssl_name" : "cert_SM2",
"algorithm_type" : "SM2",
"type" : 2,
"is_has_trusted_root_ca" : false
} ]
} ]
}, {
"update_time" : "2020-06-24T15:29:42.421926Z",
"name" : "api_group_002",
"on_sell_status" : 2,
"remark" : "API group 2",
"sl_domain" : "02a8ab3cb2784de5a096852829671ae7.apic.****.com",
"sl_domains" : [ "02a8ab3cb2784de5a096852829671ae7.apic.****.com", "02a8ab3cb2784de5a096852829671ae7.apic.****.cn" ],
"id" : "02a8ab3cb2784de5a096852829671ae7",
"register_time" : "2020-06-24T15:29:42.421926Z",
"status" : 1,
"is_default" : 2,
"sl_domain_access_enabled" : true
} ]
} 状态码:400
Bad Request
{
"error_code" : "APIG.2012",
"error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation"
} 状态码:401
Unauthorized
{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed"
} 状态码:403
Forbidden
{
"error_code" : "APIG.1005",
"error_msg" : "No permissions to request this method"
} 状态码:500
Internal Server Error
{
"error_code" : "APIG.9999",
"error_msg" : "System error"
} 状态码
状态码 | 描述 |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
500 | Internal Server Error |
错误码
请参见错误码。

