更新时间:2024-07-25 GMT+08:00
查询CC规则列表
功能介绍
查询某个策略下所有的CC规则列表。
URI
请求消息
请求参数
无
响应消息
响应参数
|
名称 |
参数类型 |
说明 |
|---|---|---|
|
total |
Integer |
该策略下CC防护规则总数量。 |
|
items |
CC规则对象列表。 |
|
名称 |
参数类型 |
说明 |
|---|---|---|
|
id |
String |
CC规则ID。 |
|
policy_id |
String |
CC防护策略的策略ID。 |
|
path |
String |
规则应用的URL链接,不包含域名。 |
|
limit_num |
Integer |
单个用户的周期内请求次数(单用户限速)。 |
|
limit_period |
Integer |
限速周期。 |
|
lock_time |
Integer |
锁定时长。取值范围为[0秒, 232秒) |
|
tag_type |
String |
防护模式。
|
|
tag_index |
String |
当“tag_type”为cookie时,该参数表示cookie name。 |
|
tag_condition |
Referer(自定义请求访问的来源)字段,当“tag_type”为“other”时,会返回该字段。 |
|
|
action |
请求次数限制到达后采取的动作。 |
|
|
timestamp |
Long |
创建CC规则的时间。 |
|
default |
Boolean |
是否为默认CC规则。
|
|
名称 |
参数类型 |
说明 |
|---|---|---|
|
category |
String |
类别,取值为“Referer”。 |
|
contents |
List |
category的内容,例如“http://www.example.com”。 |
示例
以查询CC规则列表,返回记录条数为“2”为例。
响应样例
{
"total": 2,
"items": [{
"id": "3a9b5c0f96784ec8abd8ba61a98064ef",
"policy_id": "9tre832yf96784ec8abd8ba61a98064ef",
"path": "/abc1",
"limit_num": 10,
"limit_period": 60,
"lock_time": 10,
"tag_type": "cookie",
"tag_index": "sesssionid",
"action": {
"category": "block",
"detail": {
"response": {
"content_type": "application/json",
"content": "{\"error\":\"forbidden\"}"
}
}
},
"timestamp": 1499817600,
"default": true
}, {
"id": "3d7bea768b10480984f98c6b69d43d0f",
"policy_id": "9tre832yf96784ec8abd8ba61a98064ef",
"path": "/efgh",
"limit_num": 10,
"limit_period": 60,
"lock_time": 5,
"tag_type": "other",
"tag_condition":{
"category": "referer",
"contents": ["http://www.example.com"]
}
"action": {
"category": "block",
},
"timestamp": 1499817600,
"default": true
}
]
}
父主题: CC规则