pem.addSubdomain

This method is supported by Operations starting from version 2.3.

This method adds a Subdomain into Operations under the corresponding Subscription.

The method has the following input parameters:

Name

Type

Short Description

subscription_id

int

This parameter indicates the existing Subscription under which the Subdomain is added.

domain_name

string

Name of the Domain to add the new Subdomain under.

prefix

string

The prefix for Subdomain to add. The new Subdomain will be accessible via http://prefix.domain_name URL.

[hosting_type]

int

Hosting type for the Subdomain. This parameter is optional. It can take the following values:

  • 0 - Physical Hosting (Apache/Exchange).
  • 1 - Reserved. Do not use!
  • 2 - Domain Parking Hosting (Apache).

There are the following use cases:

  • This parameter is omitted. In that case, Operations adds a Subdomain under the corresponding Subscription without adding a hosting.
  • This parameter is specified. In that case, Operations, first, adds hosting according to the value of this parameter (the Auto host domains Activation Parameter is ignored), then – all available in Subscription hosting modules.

[domain_parking_type]

int

Type of domain parking. This parameter can be issued only if hosting_type parameter is set to 2 (parked domain hosting type). It can take the following values:

  • 0Parking
  • 1Standard Forwarding
  • 2Single Page Website
  • 3Frame Forwarding

If this parameter is omitted and hosting_type is set to 2, then the Parking is used.

[path]

string

Path or URL to redirect. Parameter meaning depends on the hosting type:

  • Domain Parking Hosting – Forwarding URL. This parameter is required to specify for the Standard Forwarding or Frame Forwarding Domain Parking Hosting types only.

[provide_hosting]

boolean

This parameter can be passed only if parameter hosting_type is passed and set to 0 (Physical hosting), then new hosting is provided for this domain. For other values of the hosting_type parameter, the provide_hosting parameter is ignored.

The following options are possible:

  • 0 – the method will try to attach the subdomain to existing hosting (Apache). This is the default value for the parameter. If this parameter is not passed, then default 0 value is passed.
  • 1 – a new hosting (Apache) will be created for the subdomain.

The method has the following output parameters.

Name

Type

Short Description

domain_id

int

ID of domain.