Help Center/ Edge Security/ API Reference/ API/ WAF Domain Name Management/ Querying the List of Domain Names Protected by WAF
Updated on 2023-08-24 GMT+08:00

Querying the List of Domain Names Protected by WAF

Function

This API is used to querying the list of domain names protected by WAF.

URI

GET /v1/edgewaf/domains

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

page_num

No

Integer

Page number. The value 0 indicates that all pages are queried.

Minimum: 0

Default: 1

page_size

No

Integer

Number of items displayed on each page. A maximum of 100 items can be queried in a batch in WAF.

Minimum: 1

Maximum: 100

Default: 10

domain_name

No

String

Domain name.

enterprise_project_id

No

String

Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS).

type

No

Integer

WAF domain name configuration type. 0: basic information; 1: WAF protection configuration

Enumeration values:

  • 0

  • 1

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

total

Long

Total number of protected domain names.

Minimum: 0

Default: 0

domain_list

Array of ShowWafDomainResponseBody objects

Details about the protected domain name.

Table 4 ShowWafDomainResponseBody

Parameter

Type

Description

id

String

Domain name ID.

domain_name

String

Domain name.

enterprise_project_id

String

Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS).

tenant_id

String

Tenant ID.

open_time

Long

Last time when protection was last enabled.

close_time

Long

Last time when protection was last disabled.

dispatch_status

Integer

CDN domain name scheduling status (0: not protected; 1: configuring; 2: protected; 3: deleting)

service_area

String

Region that the domain name belongs to.

web_tag

String

Domain name.

description

String

Domain name description.

policy_id

String

Policy ID.

protocol

String

Protocol.

Enumeration values:

  • http

  • https

certificate_id

String

Certificate ID.

certificate_name

String

Certificate name.

tls

String

Minimum TLS version (TLS v1.0, TLS v1.1, or TLS v1.2). The default value is TLS v1.0. The TLS parameter is configured only if the client protocol is HTTPS.

Enumeration values:

  • TLS v1.0

  • TLS v1.1

  • TLS v1.2

cipher

String

The cipher parameter is available only if the client protocol is HTTPS. Its values are as follows, each representing a cryptographic algorithm:

  • cipher_1: ECDHE-ECDSA-AES256-GCM-SHA384:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!DES:!MD5:!PSK:!RC4:!kRSA:!SRP:!3DES:!DSS:!EXP:!CAMELLIA:@STRENGTH

  • cipher_2: EECDH+AESGCM:EDH+AESGCM

  • cipher_3: ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH

  • cipher_4: ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!EDH

  • cipher_default: ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM

Enumeration values:

  • cipher_1

  • cipher_2

  • cipher_3

  • cipher_4

  • cipher_default

protect_status

Integer

Protection status:

  • 0: disabled

  • 1: enabled

Enumeration values:

  • 0

  • 1

access_status

Integer

Access status:

  • 0: not connected

  • 1: connected

Enumeration values:

  • 0

  • 1

create_time

Long

Time when a domain name was created. The value is a 13-digit timestamp.

block_page

WafBlockPage object

Alarm page configuration.

traffic_mark

WafTrafficMark object

Traffic identifier.

flag

Flag object

Special domain name tag.

extend

Map<String,String>

Extensible attribute of the domain name.

is_added

Boolean

Whether a domain name is an anti-DDoS domain name.

Default: false

Table 5 WafBlockPage

Parameter

Type

Description

template

String

Blocking template name

custom_page

WafCustomPage object

User-defined blocking page

redirect_url

String

Redirection URL

Table 6 WafCustomPage

Parameter

Type

Description

status_code

String

Status code

content_type

String

Content type of alarm page

content

String

Page content

Minimum: 1

Maximum: 4096

Table 7 WafTrafficMark

Parameter

Type

Description

sip

Array of strings

IP address in the known attack source rule

cookie

String

cookie

Minimum: 1

Maximum: 4096

params

String

Parameter

Minimum: 1

Maximum: 4096

Table 8 Flag

Parameter

Type

Description

pci_3ds

String

Whether to enable PCI 3DS compliance certification.

  • true: yes

  • false: no

Enumeration values:

  • true

  • false

pci_dss

String

Whether to enable PCI DSS compliance certification.

  • true: yes

  • false: no

Enumeration values:

  • true

  • false

cname

String

old: The old CNAME record is used. new: new CNAME record is used.

Enumeration values:

  • old

  • new

is_dual_az

String

Whether IPv6 is enabled for the domain name.

  • true: yes

  • false: no

Enumeration values:

  • true

  • false

ipv6

String

Whether IPv6 is enabled for the domain name.

  • true: yes

  • false: no

Enumeration values:

  • true

  • false

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Query the list of domain names protected by WAF.

GET https://{Endpoint}/v1/edgewaf/domains?page_num=1&page_size=10

Example Responses

Status code: 200

Request succeeded.

{
  "total" : 12,
  "domain_list" : [ {
    "id" : "095b60b21ac248579426f97379b3fbec",
    "domain_name" : "domain_name",
    "enterprise_project_id" : 0,
    "tenant_id" : "090f4899f400d33c0f17c00d4c8435e0",
    "open_time" : 1691478912415,
    "dispatch_status" : 3,
    "service_area" : "outside_mainland_china",
    "web_tag" : "domain_name",
    "description" : "example",
    "policy_id" : "1771a426afcc4e16b8636cb72c2d53e4",
    "protocol" : "https",
    "certificate_id" : "3e9df5da33744bae90bf73291c6e5c6c",
    "certificate_name" : "example",
    "tls" : "TLS v1.0",
    "cipher" : "cipher_1",
    "protect_status" : 1,
    "access_status" : 0,
    "is_added" : false
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Request failed.

401

The token does not have required permissions.

500

Internal server error.

Error Codes

See Error Codes.