The rename operation is used to change a subdomain name.
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:
Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/184.108.40.206/agent_input.svg.
- 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:
Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/220.127.116.11/agent_output.svg.
- The result node is required. It wraps the response retrieved from the server. Data type: resultType (
- The status node is required. It specifies the execution status of the rename operation. Data type: result_status (
common.xsd). Allowed values:
- 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.
- 1007 - Subdomain with such name already exists.
- 1013 - Subdomain with such ID is absent.
- 1023 - Operation failed.
To rename a subdomain with ID 3 to forum:
<packet version="18.104.22.168"> <subdomain> <rename> <id>3</id> <name>forum</name> </rename> </subdomain> </packet>
<packet version="22.214.171.124"> <subdomain> <rename> <result> <status>ok</status> </result> </rename> </subdomain> </packet>
Leave your feedback on this topic here
If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.