Updated on 2024-05-16 GMT+08:00

Querying Details About a Domain Name

Function

This API is used to query details about a domain name.

URI

GET /v1.0/cdn/domains/{domain_id}/detail

Table 1 Path parameter

Parameter

Mandatory

Type

Description

domain_id

Yes

String

Domain name ID. For details about how to obtain the value, see the API for querying domain names.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project that the resource belongs to. This parameter is valid only when the enterprise project function is enabled. The value all indicates all projects. This parameter is mandatory when you use an IAM user to call this API.

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

Request Parameters

Table 3 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameter

Parameter

Type

Description

domain

DomainsWithPort object

Domain name details.

Table 5 DomainsWithPort

Parameter

Type

Description

id

String

Domain name ID.

domain_name

String

Domain name.

business_type

String

Service type of the domain name. Possible values: web (website acceleration), download (file download acceleration), video (VOD acceleration), and wholeSite (whole site acceleration).

user_domain_id

String

Domain ID of the domain name's owner.

domain_status

String

Domain name status. Possible 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.

cname

String

CNAME of the domain name.

sources

Array of SourceWithPort objects

Origin server address. The address type can be IP address or domain name. If the origin server address type is IP address, only IPv4 addresses are supported. If there are multiple IP addresses, multiple objects must be specified to pass these addresses respectively, and the values of the parameters except the IP address in these objects must be the same. Up to 15 IP addresses can be specified for the primary or standby origin server. If the origin server address type is domain name, only one domain name is supported. The address type can be either IP address or domain name.

domain_origin_host

DomainOriginHost object

Origin settings of the domain name.

https_status

Integer

Whether HTTPS is enabled. 0: disabled. 1: HTTPS is enabled and the origin protocol is same as the user request. 2: HTTPS is enabled and the origin protocol is HTTP. 3: HTTPS is enabled and the origin protocol is HTTPS.

create_time

Long

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

Long

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

disabled

Integer

Whether the domain name is banned. 0: not banned; 1: banned.

locked

Integer

Whether the domain name is locked. 0: not locked; 1: locked.

auto_refresh_preheat

Integer

Whether automatic refreshing and preheating are enabled. 0: disabled; 1: enabled.

service_area

String

Service area of the CDN service. mainland_china: Chinese mainland; outside_mainland_china: outside the Chinese mainland; global: global.

range_status

String

Whether range requests are supported. off: not supported. on: supported.

follow_status

String

Redirect from origin status. off: disabled. on: enabled.

origin_status

String

Origin pull status. off: disabled. on: enabled.

banned_reason

String

Reason for disabling the domain name. 1: The domain name contains inappropriate content. 2: The ICP license of the domain name has expired. 3: The domain name is under attack. 150: The domain name contains pornographic content. 151: The domain name contains sensitive political content. 152: The domain name contains violent content. 153: The domain name contains gambling content.

locked_reason

String

Reason for locking the domain name.

enterprise_project_id

String

ID of the enterprise project to which the resource belongs. This parameter is valid only when the enterprise project function is enabled. If this parameter is not specified, the default project is used. This parameter is mandatory when you use an IAM user to call this API.

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

Table 6 SourceWithPort

Parameter

Type

Description

domain_id

String

Domain name ID.

ip_or_domain

String

Non-intranet IP address or domain name of the origin server.

origin_type

String

Origin server type. ipaddr: IP address; domain: domain name; obs_bucket: OBS bucket.

active_standby

Integer

Whether the origin server is primary or standby. 1: primary; 0: standby. A primary origin server is mandatory, while a standby origin server is optional.

enable_obs_web_hosting

Integer

Whether static hosting is enabled for an OBS bucket. 0: disabled; 1: enabled. This parameter is passed only when origin_type is set to obs_bucket.

http_port

Integer

HTTP port. Default value: 80.

https_port

Integer

HTTPS port. Default value: 443.

Table 7 DomainOriginHost

Parameter

Type

Description

domain_id

String

Domain name ID. For details about how to obtain the value, see the API for querying domain names.

origin_host_type

String

Host type.

customize_domain

String

Custom host domain name for origin pull.

Example Request

GET https://cdn.myhuaweicloud.com/v1.0/cdn/domains/12a***********************345d671/detail?enterprise_project_id=1

Example Response

Status code: 200

OK

{
  "domain" : {
    "sources" : [ {
      "domain_id" : "12a***********************345d671",
      "origin_type" : "ipaddr",
      "ip_or_domain" : "10.62.53.75",
      "active_standby" : 1,
      "http_port" : 80,
      "https_port" : 443
    } ],
    "cname" : "www.example1.com.c.example2.com",
    "id" : "12a***********************345d671",
    "user_domain_id" : "1a23***********************4a441",
    "domain_name" : "www.example1.com",
    "business_type" : "web",
    "service_area" : "mainland_china",
    "domain_status" : "online",
    "https_status" : 0,
    "create_time" : 1516861994806,
    "modify_time" : 1532405346365,
    "domain_origin_host" : {
      "domain_id" : "12a***********************345d671",
      "origin_host_type" : "customize",
      "customize_domain" : "www.example4.com"
    },
    "disabled" : 0,
    "locked" : 0,
    "range_status" : "off",
    "follow_status" : "off",
    "origin_status" : "on",
    "auto_refresh_preheat" : 0
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.