Updated on 2022-08-09 GMT+08:00

Applying for a Certificate

Function

This API is used to complete certificate application information, such as the domain name bound to a certificate and the applicant's detailed information.

The request parameter agree_privacy_protection must be set to true. Otherwise, the certificate application information cannot be submitted.

URI

  • URI format

    POST /v2/{project_id}/scm/cert/{cert_id}/complete

  • Parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID.

    cert_id

    Yes

    String

    Certificate ID.

Request

Request parameters

Parameter

Mandatory

Type

Description

domain

Yes

String

Domain name bound to a certificate.

  • If the certificate to be purchased is a single-domain or wildcard domain name certificate, enter the single-domain or wildcard domain name.
  • If the certificate to be purchased is a multi-domain certificate, select one domain name as the primary domain name.

Example: www.example.com

sans

No

String

Additional domain name of the certificate that is bound to a multi-domain certificate.

Set this parameter only when the certificate to be purchased is a multi-domain certificate and the number of additional domain names can be increased.

Multiple domain names must be separated by semicolons (;).

Example: www.example.com;www.example1.com;www.example2.com

csr

No

String

Certificate CSR, which must match the domain name.

company_name

Yes

String

Company name. This parameter is mandatory for certificates of the OV and EV types.

The value must contain 0 to 63 characters.

company_unit

No

String

Department name. This parameter is optional for certificates of the OV and EV types.

The value must contain 0 to 63 characters.

company_province

Yes

String

State or region where a company is located. This parameter is mandatory for certificates of the OV and EV types.

The value must contain 0 to 63 characters.

company_city

Yes

String

City where a company is located. This parameter is mandatory for certificates of the OV and EV types.

The value must contain 0 to 63 characters.

country

Yes

String

Country code.

  • CN: China
  • US: United States

applicant_name

Yes

String

Applicant name.

The value must contain 0 to 63 characters.

applicant_phone

Yes

String

Phone number of an applicant.

Example: 13212345678

applicant_email

Yes

String

Email of an applicant.

Example: example.huawei.com

contact_name

No

String

Name of a technical contact.

The value must contain 0 to 63 characters.

contact_phone

No

String

Phone number of a technical contact.

Example: 13212345678

contact_email

No

String

Email of a technical contact.

Example: example.huawei.com

auto_dns_auth

No

Boolean

Whether to push DNS authentication information to HUAWEI CLOUD DNS.

  • true: DNS authentication information is pushed to HUAWEI CLOUD DNS.
  • false: DNS authentication information is not pushed to HUAWEI CLOUD DNS.

agree_privacy_protection

Yes

Boolean

Whether to agree with the privacy statement.

  • true: Agree with the privacy statement.
  • false: Disagree with the privacy statement.

You can submit your certificate application only when this parameter is set to true.

Response

Response parameters

Parameter

Mandatory

Type

Description

request_info

Yes

String

Request result.

Example

The following describes how to supplement information about a certificate.

  • Example request
    {
        "domain":"www.xzz.com",
         "company_name": "Huawei Chengdu branch",
        "company_province": "Sichuan",
       "company_city": "Chengdu",
        "applicant_name": "Tom",
        "applicant_phone":"13212345678",
        "applicant_email":"9997342346@qq.com",
        "csr":"",
        "sans":"",
        "country":"CN",
        "company_unit": "Human Resource Dept",
        "contact_name": "Jacky",
        "contact_phone":"13512345678",
        "contact_email":"jk@jk.ff",
        "auto_dns_auth":false,
        "agree_privacy_protection":true
    }
  • Example response
    { 
        "request_info":"success"
    }

    or

    { 
       "error_code": "SCM.XXXX",  
       "error_msg": "XXXX"   
     }

Status Codes

Table 1 lists the normal status code returned by the API.
Table 1 Status Codes

Status Codes

Status

Description

200

OK

Request processed successfully.

For details about error codes, see Error Codes