Renaming Subdomain

The rename operation is used to change a subdomain name.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet renaming a subdomain includes the rename operation node:

<packet>
<subdomain>
<rename>
...
</rename>
</subdomain>
</packet>

 

The rename node is presented by the SubdomainRenameInputType (subdomain.xsd). Its graphical representation is as follows:

SubdomainRenameInputType

  • The id node is required. It specifies a subdomain ID. Data type: id_type.
  • The name node is required. It specifies a new name of the subdomain (without parent site name). Data type: string.

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

Response Packet Structure

The rename node of the output XML packet is structured as follows:

SubdomainRenameOutputType

  • The result node is required. It wraps the response retrieved from the server. Data type: resultType (common.xsd).
  • The status node is required. It specifies the execution status of the rename operation. Data type: result_status (common.xsd). Allowed values: ok|error.
  • The errcode node is required if the rename operation fails. It is used to return the error code. Data type: unsignedInt.
  • The errtext node is required if the rename operation fails. It is used to return the error message. Data type: string.

 

Possible Errors

  • 1007 - Subdomain with such name already exists.
  • 1013 - Subdomain with such ID is absent.
  • 1023 - Operation failed.

 

 

Samples

To rename a subdomain with ID 3 to forum:

<packet version="1.5.2.0">
<subdomain>
<rename>
   <id>3</id>
   <name>forum</name>
</rename>
</subdomain>
</packet>

Response:

<packet version="1.5.2.0">
<subdomain>
   <rename>
      <result>
         <status>ok</status>
      </result>
   </rename>
</subdomain>
</packet>
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.