Creating a Site
The add operation lets you add a site or a subdomain to an already existing subscription.
Request Packet Structure
A request XML packet adding a new webspace to Plesk database includes the add operation node:
The add node does not have a separate type, it is nested within the complex type (
site.xsd). The add node has the following graphics representation:
It is used to specify the general information about the site. Data type: complex. See the structure of this node in the Node add/gen_setup section.
It specifies hosting settings on a site. Data type: siteHostingAgentSet (
site.xsd). See the structure of this node in the Hosting section.
It specifies a collection of site preferences. Data type: domainPrefs (
plesk_domain.xsd). See the structure of this node in the Site Preferences section.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The add node of the response packet is structured as follows:
It wraps the result of the requested add operation. Data type: resultType (
It returns the execution status of the add operation. Data type: string. Allowed values:
ok | error.
Is used to return the error code when the add operation fails. Data type: unsignedInt.
Can be used to return an error message if the add operation fails. Data type: string.
It is required If the operation succeeds. Returns the unique identifier of a new site. Data type: integer.
It is required if the operation succeeds. Returns the global unique identifier of a new site. Data type: string.
Creating a subdomain
The following request creates a subdomain named
sub555.example.com for the domain
example.com (id=1) belonging to the subscription with id 12 using the default values for the subdomain's hosting settings:
Creating a site
This is a sample request packet that creates a site named
sample.tst belonging to the subscription with id 10.