Help Center/ Edge Security/ API Reference/ API/ WAF Domain Name Management/ Viewing the CDN Domain Name List
Updated on 2023-08-24 GMT+08:00

Viewing the CDN Domain Name List

Function

This API is used to view the CDN domain name list.

URI

GET /v1/edgesec/cdn/domains

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Offset in query pagination.

Minimum: 0

Default: 0

limit

No

Integer

Maximum number of records displayed on each page.

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).

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

Integer

Total number of CDN domain names.

count

Integer

Number of CDN domain names in the query result.

domains

Array of ShowCdnDomainResponseBody objects

CDN domain name details.

Table 4 ShowCdnDomainResponseBody

Parameter

Type

Description

domain_name

String

Domain name.

domain_status

String

Status of an acceleration domain name. Values:

  • online: CDN has been enabled for this domain name.

  • offline: CDN has been disabled for this domain name.

  • configuring: The domain name configuration is in progress.

  • *configure_failed: The configuration fails.

  • checking: The domain is being reviewed.

  • check_failed: The domain name fails the review.

  • deleting: The domain name is being deleted.

domain_id

String

Domain name ID.

certificate_id

String

ID of the certificate used for the domain name.

service_area

String

Domain name service area.

Enumeration values:

  • mainland_china

  • outside_mainland_china

  • global

  • europe

ipv6_accelerate

Integer

Whether to enable IPv6 acceleration. The value can be 0 (disabled) or 1 (enabled).

Enumeration values:

  • 1

business_type

String

Service type of the domain name. Possible values:

  • web: website acceleration

  • download: file download acceleration

  • video: VOD acceleration

  • wholeSite: whole site acceleration

https_status

Integer

Whether to enable HTTPS. The value can be 0 (disabled) and 1 (enabled).

Enumeration values:

  • 0

  • 1

force_redirect

Integer

Forced redirection. 0: disabled; 1: forced redirection to HTTP; 2: forced redirection to HTTPS

extended_tags

CdnDomainTags object

CDN domain name security service constraint.

is_added

Boolean

Whether a domain name is protected by WAF.

Default: false

Table 5 CdnDomainTags

Parameter

Type

Description

notes

String

Reason

constraint

String

Content

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

View the CDN domain name list.

GET https://{Endpoint}/v1/edgesec/cdn/domains?offset=0&limit=10

Example Responses

Status code: 200

Request succeeded.

{
  "total" : 12,
  "count" : 10,
  "domains" : [ {
    "domain_name" : "domain_name",
    "domain_status" : "online",
    "domain_id" : "3e9df5da33744bae90bf73291c6e5c6c",
    "certificate_id" : "8da2b3da33744bae90bf73291c6e5c6c",
    "service_area" : "outside_mainland_china",
    "ipv6_accelerate" : 0,
    "business_type" : "web",
    "https_status" : 1,
    "force_redirect" : 0,
    "extended_tags" : [ {
      "notes" : "example",
      "constraint" : "example"
    } ],
    "is_added" : true
  } ]
}

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.