Calls the GetMainDomainName operation to query the primary domain name based on input parameters.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetMainDomainName

The operation that you want to perform. Set the value to GetMainDomainName.

InputString String Yes www.example.com

The input string. The string can be up to 128 characters in length.

AccessKeyId String No your_accesskey_id

The AccessKey ID provided to you by Alibaba Cloud.

Lang String No en

The language type.

Response parameters

Parameter Type Example Description
DomainLevel Long 2

The level of the entered domain name.

DomainName String example.com

The domain name.

RR String www

The host record.

RequestId String 536E9CAD-DB30-4647-AC87-AA5CC38C5382

The ID of the request.

Examples

Sample requests


http(s)://[Endpoint]/?Action=GetMainDomainName
&InputString=www.example.com
&<Common request parameters>

Sample success responses

XML format

<GetMainDomainNameResponse>
      <RequestId>536E9CAD-DB30-4647-AC87-AA5CC38C5382</RequestId>
      <DomainName>example.com</DomainName>
      <RR>www</RR>
      <DomainLevel>2</DomainLevel>
</GetMainDomainNameResponse>

JSON format

{
	"RR":"www",
	"RequestId":"536E9CAD-DB30-4647-AC87-AA5CC38C5382",
	"DomainName":"example.com",
	"DomainLevel":2
}

Error codes

For a list of error codes, visit the API Error Center.