查询防护域名列表
功能介绍
查询防护域名列表。
URI
- URI格式
GET /v1/{project_id}/waf/instance?offset={offset}&limit={limit}&hostname={hostname}&policyname={policyname}
- 参数说明
表1 Path参数 名称
是否必选
参数类型
说明
project_id
是
String
用户操作的项目ID。
offset
否
Long
指定返回的页数,取值范围为:[0, 65535],默认值为0。
limit
否
Long
指定查询返回每页记录的最大条数,取值范围为:(0, 50],默认值为10。当limit=-1时,将返回offset=0,limit=65535的数据。
hostname
否
String
防护域名。
policyname
否
String
防护策略的名称。
请求消息
请求参数
无
响应消息
|
名称 |
参数类型 |
说明 |
|---|---|---|
|
total |
Integer |
返回的域名总数。 |
|
items |
返回的防护域名对象列表。 |
|
名称 |
参数类型 |
说明 |
|---|---|---|
|
id |
String |
防护域名的ID。 |
|
hostname |
String |
返回的防护域名。 |
|
cname |
String |
生成的CNAME值。 例如:efec1196267b41c399f2980ea4048517.waf.cloud.com |
|
txt_code |
String |
TXT记录,当“proxy”为“true”时,才会返回该值。 |
|
sub_domain |
String |
子域名,当“proxy”为“true”时,才会返回该值。 |
|
policy_id |
String |
policy的ID。 |
|
protect_status |
Integer |
防护状态。
|
|
access_status |
Integer |
接入状态。
|
|
proxy |
Boolean |
是否使用代理。
|
|
timestamp |
Long |
创建防护域名的时间。 |
示例
如下以查询防护域名列表,返回记录条数为“2”为例。
{
"total": 2,
"items": [
{
"id": "388a7789d55b41d1918b3088a8f1e7f3",
"hostname": "www.a.com",
"cname": "3249d21e5eb34d21be12fdc817fcb67d.waf.cloud.com",
"txt_code": "3249d21e5eb34d21be12fdc817fcb67d",
"sub_domain": "3249d21e5eb34d21be12fdc817fcb67d.www.a.com",
"policy_id": "xxxxxxxxxxxxxx",
"protect_status": 0,
"access_status": 0,
"proxy": true,
"timestamp": 1499817600
},
{
"id": "296a7710d55b41d1918b3036a8f1e7e5",
"hostname": "www.b.com",
"cname": "efec1196267b41c399f2980ea4048517.waf.cloud.com",
"policy_id": "xxxxxxxxxxxxxx",
"protect_status": 1,
"access_status": 1,
"proxy": false,
"timestamp": 1499817612
}
]
}