Renaming Site Aliases

The rename operation is used to rename the specified site alias. The site alias can be specified either by ID, or by name.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet renaming the site alias in Plesk database includes the rename operation node:

<packet>
<site-alias>
<rename>
...
</rename>
</site-alias>
</packet>

 

The rename node graphical representation is as follows:

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:

 

Samples

The following XML packet renames the MyAlias.com site alias to MyNewAlias.com:

<packet>
<site-alias>
   <rename>
      <name>MyAlias.com</name>
      <new_name>MyNewAlias.com</new_name>
   </rename>
</site-alias>
</packet>

Response:

<packet>
<site-alias>
<rename>
   <result>
      <status>ok</status>
   </result>
</rename>
</site-alias>
</packet>

The following XML packet is not valid because it specifies both alias name and id.

<packet>
<site-alias>
   <rename>
      <id>15</id>
      <name>MyAlias.com</name>
   </rename>
</site-alias>
</packet>