This API is used to query the list of domain names.
GET /v1/{project_id}/waf/instance?offset={offset}&limit={limit}&hostname={hostname}&policyname={policyname}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
offset |
No |
Long |
Specifies the number of returned pages. Its value ranges from 0 to 65535. The default value is 0. |
limit |
No |
Long |
Specifies the maximum number of records displayed on each page. Its value ranges from 0 to 50. The default value is 10. If limit is -1, one page with 65535 records is displayed. |
hostname |
No |
String |
Specifies the domain name. |
policyname |
No |
String |
Specifies the policy name. |
Request parameters
None
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Specifies the total number of domain names. |
items |
Specifies the domain objects. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the domain ID. |
hostname |
String |
Specifies the returned domain name. |
cname |
String |
Specifies the CNAME value. For example, efec1196267b41c399f2980ea4048517.waf.cloud.com. |
txt_code |
String |
Specifies the TXT record. This parameter is returned only when proxy is set to true. |
sub_domain |
String |
Specifies the subdomain name. This parameter is returned only when proxy is set to true. |
policy_id |
String |
Specifies the policy ID. |
protect_status |
Integer |
Specifies the WAF mode.
|
access_status |
Integer |
Specifies whether a domain name is connected to WAF.
|
proxy |
Boolean |
Specifies whether a proxy is configured.
|
timestamp |
Long |
Specifies the time when a domain name is created. |
total with a value of 2 is used as an example.
{ "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 } ] }
For details about error status codes, see Status Codes.