Help Center > > API Reference> APIs (New Version)> Domain Name Operations> Querying Acceleration Domain Names

Querying Acceleration Domain Names

Updated at:May 29, 2020 GMT+08:00

Function

This API is used to query information about acceleration domain names.

URI

GET /v1.0/cdn/domains

Request

Request parameters

Table 1 describes the request parameters.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

domain_name

No

String

Specifies the acceleration domain name, which is matched in a fuzzy manner. The value contains 1 to 255 characters.

business_type

No

String

Specifies the service type of the acceleration domain name. Valid values:

  • web
  • download
  • video

domain_status

No

String

Specifies the status of the acceleration domain name. Valid 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: Domain review fails.
  • deleting: The domain name is being deleted.

service_area

No

String

Specifies the area covered by the acceleration service. Valid values are as follows:

  • mainland_china
  • outside_mainland_china
  • global

page_size

No

Integer

Number of records on each page. The value range is 1 to 10,000. If this parameter is not set, the default value 30 is used.

page_number

No

Integer

Specifies the page number that is queried. The value range is 1 to 65,535. If this parameter is not set, the default value 1 is used.

user_domain_id

No

String

Specifies the domain ID of the domain name's owner.

enterprise_project_id

No

String

Specifies the enterprise project ID. This parameter is valid only for users who have enabled the enterprise project function. If this parameter is not specified, the default project is queried. ALL indicates that the resources of all authorized projects of the user are queried.

Example request

Requested path

GET https://cdn.myhuaweicloud.com/v1.0/cdn/domains?domain_name=www.example.com&page_size=10&page_number=1&enterprise_project_id=0

Response

Response parameters

Table 2 describes the response parameters.
Table 2 Response parameter

Parameter

Type

Description

total

Integer

Specifies the total number of queried acceleration domain names.

domains

Array of objects

Specifies the query results. For details, see Table 3.

domains parameter description

Table 3 describes the parameters.

Table 3 domains parameter description

Parameter

Type

Description

id

String

Specifies the acceleration domain name ID.

domain_name

String

Specifies the acceleration domain name.

business_type

String

Specifies the service type. Valid values are web (website acceleration), download (download acceleration), and video (VOD acceleration).

user_domain_id

String

Specifies the domain ID of the domain name's owner.

domain_status

String

Specifies the status of the acceleration domain name. Possible values are online (CDN enabled), offline (CDN disabled), configuring (being configured) configure_failed (configuration failed), checking (being reviewed), check_failed (review failed), and deleting (being deleted).

cname

String

Specifies the CNAME of the acceleration domain name.

sources

Array of objects

Specifies the domain name or the IP address of the origin server. Enter a maximum of 10 IP addresses and use commas (,) to separate them. Only IPv4 addresses are allowed. For details, see Table 4.

domain_origin_host

Object

Specifies the retrieval configuration of the domain name. For details, see Table 5.

create_time

Integer

Specifies the time when the domain name is created, which is expressed as milliseconds since 1970-01-01 00:00:00 Coordinated Universal Time (UTC).

modify_time

Integer

Specifies the time when the domain name is modified, which is expressed as milliseconds since 1970-01-01 00:00:00 UTC.

auto_refresh_preheat

Integer

Specifies whether to enable automatic refresh and preheating. The value can be 0 (disabled) or 1 (enabled).

disabled

Integer

Specifies whether the domain is banned. 0: not banned; 1: banned.

locked

Integer

Specifies whether the domain is locked. 0: not locked; 1: locked.

service_area

String

Specifies the area covered by the acceleration service. Valid values are mainland_china, outside_mainland_china, and global.

range_status

String

Specifies whether range-based retrieval is enabled.

follow_status

String

Specifies whether 302 redirect retrieval is enabled.

https_status

Integer

Specifies whether the HTTPS certificate is enabled. 0: Disable HTTPS. The certificate and private key are not needed; 1: Enable HTTPS for acceleration and follow protocol for retrieval; 2: Enable HTTPS for acceleration and use HTTP for retrieval. The certificate and private key are needed.

origin_status

String

Specifies the content retrieval switch. The value can be off or on.

enterprise_project_id

String

Specifies the ID of the enterprise project to which the domain name resource belongs. This parameter is returned when the enterprise project function is enabled.

sources parameter description

Table 4 describes the parameters.

Table 4 sources parameter description

Parameter

Type

Description

domain_id

String

Specifies the domain name ID.

ip_or_domain

String

Specifies the IP address or domain name of the origin server.

origin_type

String

Specified the type of the origin server. Valid values are ipaddr (IP address of the origin server), obs_bucket (domain name of an OBS bucket), and domain (domain name of the origin server).

active_standby

Integer

Specifies whether an origin server is active or standby (1: active; 0: standby). An active origin server is mandatory, while a standby origin server is optional. An OBS bucket does not have a standby origin server.

domain_origin_host parameter description

Table 5 describes the parameters.

Table 5 domain_origin_host parameter description

Parameter

Type

Description

domain_id

String

Specifies the domain name ID.

origin_host_type

String

Specifies the type of the retrieval host.

customize_domain

String

Specifies the custom domain name of the retrieval host.

  • Example response
    {
    	"total": 34,
    	"domains": [{
    		"sources": [{
    			"domain_id": "16577532e****************6b3e5ae6b",
    			"origin_type": "ipaddr",
    			"ip_or_domain": "1.2.3.6",
    			"active_standby": 1
    		}],
    		"cname": "www.example.com.c.test.com",
    		"id": "16577532e3fc4684844129b6b3e5ae6b",
    		"user_domain_id": "a6922b75*******bc22d14c5",
    		"domain_name": "www.example.com",
    		"business_type": "web",
    		"service_area": "mainland_china",
    		"domain_status": "online",
    		"https_status": 0,
    		"create_time": 1579423074435,
    		"modify_time": 1579423140535,
                    "auto_refresh_preheat":0,
    		"domain_origin_host": {
    			"domain_id": "16577532e****************6b3e5ae6b",
    			"origin_host_type": "accelerate",
    			"customize_domain": "www.example.co"
    		},
    		"disabled": 0,
    		"locked": 0,
    		"range_status": "off",
    		"follow_status": "off",
    		"origin_status": "on",
    		"enterprise_project_id": 0
    	}]
    }

Status Code

See Status Codes.

Error Code

See Error Codes.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel