Moving Databases to Another Subscription
Use the assign-to-subscription operation to move a database to another subscription (webspace). Learn more in the Administrator's Guide.
Request Packet Structure
A request XML packet moving a database between subscriptions includes the assign-to-subscription operation node:
<packet> <database> <assign-to-subscription> ... </assign-to-subscription> </database> </packet>
The assign-to-subscription node is presented by type DatabaseAssignToSubscriptionInputType (
database_input.xsd), and its graphical representation is as follows:
- The filter node is required. It specifies the filtering rule. For information on filters, refer to the Available Filters section. Data type: DatabaseFilterType.
- The webspce-id node is required. It specifies the subscription to which the database will be moved. Data type: id_type.
Response Packet Structure
The assign-to-subscription node of the output XML packet is presented by type DatabaseSetDBOutputType (
database_output.xsd) and 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 set-default-user operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the set-default-user operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the set-default-user operation fails. Data type: string.
- The filter-id or id node is optional. It returns the parameter of a filtering rule. Learn more in Available Filters.
This request moves the database with ID 1 to the subscription with ID 2.
<packet> <database> <assign-to-subscription> <filter> <id>1</id> </filter> <webspace-id>2</webspace-id> </assign-to-subscription> </database> </packet>
<packet version="220.127.116.11"> <database> <assign-to-subscription> <result> <status>ok</status> <filter-id>1</filter-id> <id>1</id> </result> </assign-to-subscription> </database> </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.