pem.addDomain

This method is supported by Operations starting from version 2.3.

This method creates a domain and adds all the available in Subscription hosting modules to the Domain created. Subscription should not contain conflicting hosting modules simultaneously, like QMail and Exchange.

Additionally, there is an ability to control which hosting modules to add to the Domain from the Subscription. Every Resource Type, which corresponds to the certain hosting, has the Auto host domains Activation Parameter. If this parameter has the Yes value, hosting will be added to the Domain during the call of method. If this parameter has the No value, hosting will not be added to the Domain during the call of method. This Activation Parameter controls the provisioning of the following hosting modules:

  • Domain Parking Hosting (Apache)
  • Exchange Hosting
  • Apache Web Hosting
  • CQMail Hosting

The method has the following input parameters:

Name

Type

Short Description

subscription_id

int

ID of Subscription.

[domain_id]

int

ID of Domain to create. This parameter is optional.

domain_name

string

Name of Domain to create.

[registrar_status]

int

Initial registrar status for Domain. It can take the following values:

  • 0 – Domain check result is undefined.
  • 1 – Domain is not registered.
  • 2 – Domain is registered.

This parameter is optional. If it is omitted, then the value of the Domain registrar status default value System Property is used to set the registrar status for Domain.

[hosting_type]

int

Hosting type for new Domain. 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 all available in the Subscription hosting modules.
  • 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 for Standard Forwarding or Frame Forwarding Domain Parking Hosting types only.

[external_domain]

boolean

This parameter defines a type of DNS Hosting for domain. If parameter is specified and its value is set to 1 (true), Operations creates a domain having the external DNS Hosting type.

[force]

boolean

This parameter defines Domain creating mode. There are the following possible values:

  • 0 – Default value. There are the following scenarios:
  • Domain with the same name exists in Operations. In this case error is returned.
  • Domain with the same name does not exist. In this case method removes Domain Request with the same name for Subscription specified, and creates new Domain.
  • 1 – There are the following scenarios:
  • Domain with the same name exists in Operations under different Account. Method removes from Operations all Domain Requests with the same name, then removes existing Domain, and creates new one for Subscription specified.
  • Domain with the same name exists in Operations under current Account. In this case method removes from Operations all Domain Requests with the same name, and modifies Domain's properties according to parameters passed.
  • Domain with the same name does not exist. Method removes from Operations all Domain Requests with the same name, and creates new Domain for Subscription specified.

The method has the following output parameter.

Name

Type

Short Description

domain_id

int

ID of Domain created.

For XML-RPC sample of using this method see pem.addDomain Sample in the XML-RPC Samples Appendix.