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:
- 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:
- 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="184.108.40.206"> <subdomain> <rename> <id>3</id> <name>forum</name> </rename> </subdomain> </packet>
<packet version="220.127.116.11"> <subdomain> <rename> <result> <status>ok</status> </result> </rename> </subdomain> </packet>