查看API绑定的流控策略列表
功能介绍
查询某个API绑定的流控策略列表。每个环境上应该最多只有一个流控策略。
URI
HTTP/HTTPS请求方法以及URI如下表所示。
|
请求方法 |
URI |
|---|---|
|
GET |
/v1.0/apigw/throttle-bindings/binded-throttles[?page_no, page_size, api_id, throttle_id, throttle_name,env_id] |
- 可以在URI后面用‘?’和‘&’添加不同的查询条件组合。
- 查询条件可为以下字段以及对应的值:api_id 、throttle_id、throttle_name、env_id、page_size、page_no。
URI中的参数说明如下表所示。
|
名称 |
是否必选 |
类型 |
说明 |
|---|---|---|---|
|
api_id |
是 |
String |
api的ID。 |
|
throttle_id |
否 |
String |
流控策略的编号 |
|
throttle_name |
否 |
String |
流控策略的名称 |
|
env_id |
否 |
String |
绑定的环境编号 |
|
page_size |
否 |
Integer |
每页显示的条数,默认值:20 |
|
page_no |
否 |
Integer |
页码,默认值:1 |
请求消息
无
响应消息
|
名称 |
类型 |
说明 |
|---|---|---|
|
total |
Integer |
满足条件的流控策略总数 |
|
size |
Integer |
本次查询返回的列表长度 |
|
throttles |
字典数据类型 |
本次查询返回的流控策略列表 |
|
参数 |
类型 |
说明 |
|---|---|---|
|
id |
String |
流控策略的ID |
|
name |
String |
流控策略的名称 |
|
api_call_limits |
Integer |
单个API流控时间内能够被访问的次数限制 |
|
user_call_limits |
Integer |
单个用户流控时间内能够访问API的次数限制 |
|
app_call_limits |
Integer |
单个APP流控时间内能够访问API的次数限制 |
|
ip_call_limits |
Integer |
单个源IP流控时间内能够访问API的次数限制 |
|
time_interval |
Integer |
流控的时长 |
|
time_unit |
String |
流控的时间单位 |
|
remark |
String |
描述 |
|
create_time |
Timestamp |
创建时间 |
|
is_include_special_throttle |
Integer |
是否包含特殊流控:1、包含;2、不包含 |
|
env_name |
String |
流控策略生效的环境(即在哪个环境上有效) |
|
type |
Integer |
流控策略的类型 |
|
bind_id |
String |
流控策略与API绑定关系编号 |
|
bind_time |
Timestamp |
流控策略与API绑定时间 |
|
bind_num |
Integer |
流控策略绑定的API数量 |
|
enable_adaptive_control |
String |
是否开启动态流控,暂不支持 |
{
"total": 1,
"size": 1,
"throttles": [{
"id": "0325b671-2d50-4614-9868-22102262695d",
"name": "每秒1000次",
"api_call_limits": 1000,
"user_call_limits": 500,
"app_call_limits": 300,
"ip_call_limits": 100,
"time_interval": 1,
"time_unit": "SECOND",
"create_time": "2017-12-29T01:55:59Z",
"remark": "API每秒1000次,用户500次,APP300次",
"is_inclu_special_throttle": 2,
"env_name": "RELEASE",
"type":1,
"bind_id":"359f5c1868f647b6ad0f0d285154a791",
"bind_time":"2019-07-08T01:27:38Z",
"bind_num":1,
"enable_adaptive_control":"FALSE"
}]
}
状态码
|
状态码 |
说明 |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
500 |
Server Internal Error |