Creating a Copy of a Reseller Plan
The duplicate operation is used to create a copy of the specified reseller plan.
Request Packet Structure
A request XML packet creating a copy of the specified reseller plan includes the duplicate operation node:
<packet>
<reseller-plan>
<duplicate>
...
</duplicate>
</reseller-plan>
</packet>
The duplicate
node is presented by type
ResellerTemplateDuplicateInputType (reseller_template.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/1.6.8.0/agent_input.svg.
- The name node is required. It specifies the name of the reseller plan you will copy. Data type: string.
- The duplicate-name node is required. It specifies the name of the reseller plan copy. Data type: string.
Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The duplicate node of the response packet is structured as follows:
Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.
- The result node is required. It wraps the response received
from the server. Data type: ResellerTemplateOutputResulttype
(
reseller_template.xsd
).- The status node is required. It specifies the execution
status of the add operation. Data type: result_status
(
common.xsd
). Allowed values:ok|error
. - The errcode node is required if the add operation fails. It returns the error code. Data type: unsignedInt.
- The errtext node is required if the add operation fails. It returns the error message. Data type: string.
- The id node is optional. It returns ID of a created reseller plan. Data type: integer.
- The name node is not returned with this operation.
- The guid node is optional. It returns GUID of a reseller plan. Data type: string.
- The external-id node contains the plan ID in the Plesk components if it was specified in the request packet. Data type: string.
- The problems node is optional. It states the problems which occurred on the operation execution. Data type: string.
- The status node is required. It specifies the execution
status of the add operation. Data type: result_status
(
Samples
This packet creates the copy of the reseller plan Default Reseller and assigns the name Plan copy to the copy.
<packet>
<reseller-plan>
<duplicate>
<name>Default Reseller</name>
<duplicate-name>Plan copy</duplicate-name>
</duplicate>
</reseller-plan>
</packet>
Response:
<packet>
<reseller-plan>
<duplicate>
<result>
<status>ok</status>
<id>20</id>
<guid>5dc5a4d7-7449-127f-f694-a0233af4e09f</guid>
</result>
</duplicate>
</reseller-plan>
</packet>