Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying a Domain Name

Updated on 2022-12-29 GMT+08:00

Function Description

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

URI

  • URI format

    GET /v1/{project_id}/waf/instance/{instance_id}

  • Parameter description
    Table 1 Path parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Specifies the project ID.

    instance_id

    Yes

    String

    Specifies the instance ID.

Request

Request parameters

None

Response

Response parameters
Table 2 Response parameters

Parameter

Type

Description

id

String

Specifies the instance ID.

hostname

String

Specifies the 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.

  • 0: disabled.
  • 1: enabled.
  • -1: bypassed.

access_status

Integer

Specifies whether a domain name is connected to WAF.

  • 0: The domain name is not connected to WAF.
  • 1: The domain name is connected to WAF.

protocol

String

Specifies the protocol type. The options are HTTP, HTTPS, and HTTP,HTTPS.

certificate_id

String

Specifies the certificate ID. This parameter is returned only when client_protocol is set to HTTPS.

server

Array

Specifies the origin server information, including the client_protocol, server_protocol, address, and port fields.

  • client_protocol: protocol type of the client. The options are HTTP and HTTPS.
  • server_protocol: protocol used by WAF to forward client requests to the server. The options are HTTP and HTTPS.
  • address: public IP address or domain name of the web server that the client accesses
  • port: port number used by the web server. The value ranges from 0 to 65535, for example, 8080.

proxy

Boolean

Specifies whether a proxy is configured.

  • true: A proxy is configured.
  • false: No proxy is configured.

sip_header_name

String

Specifies the type of the source IP header. This parameter is returned only when proxy is set to true.

The options are as follows: default, cloudflare, akamai, and custom.

sip_header_list

Array

Specifies the HTTP request header for identifying the real source IP address. This parameter is returned only when proxy is set to true.

  • If sip_header_name is default, sip_header_list is ["X-Forwarded-For"].
  • If sip_header_name is cloudflare, sip_header_list is ["CF-Connecting-IP", "X-Forwarded-For"].
  • If sip_header_name is akamai, sip_header_list is ["True-Client-IP"].
  • If sip_header_name is custom, you can customize a value.

timestamp

Long

Specifies the time when a domain name is created.

block_page

BlockPage object

Alarm page configuration

Table 3 BlockPage

Parameter

Type

Description

template

String

Template name

custom_page

CustomPage object

Custom alarm page

redirect_url

String

URL

Table 4 CustomPage

Parameter

Type

Description

status_code

String

Status code

content_type

String

The content type of the custom alarm page. The value can be text/html, text/xml, or application/json.

content

String

Configure the page content based on the value for content_type.

Example

www.a.com is used as an example.

Response example
{
          "id": "388a7789d55b41d1918b3088a8f1e7f3",
          "hostname": "www.a.com",
          
          "cname": "3249d21e5eb34d21be12fdc817fcb67d.waf.cloud.com",
          "txt_code": "3249d21e5eb34d21be12fdc817fcb67d",
          "sub_domain": "3249d21e5eb34d21be12fdc817fcb67d.www.a.com",
          "policy_id": "xxxxxxxxxxxxxx",
          "certificate_id": "xxxxxxxxxxxxxxxxxxx",
          "protect_status": 0,
          "access_status": 0,
          "protocol": "HTTP,HTTPS",

          "server": [
             {"client_protocol": "HTTPS", "server_protocol":"HTTP", "address":"X.X.X.X.", "port":443},
             {"client_protocol": "HTTP", "server_protocol":"HTTP", "address":"X.X.X.X", "port":80}
          ],
         "proxy": true,
         "sip_header_name": "default",
         "sip_header_list": ["X-Forwarded-For"],
         "timestamp": 1499817600
         "block_page" : { 
         "template" : "default"
          },
         
         
}

Status Code

Table 5 describes the normal status code returned by the API.
Table 5 Status code

Status Code

Description

Meaning

200

OK

The request has succeeded.

For details about error status codes, see Status Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback