Deleting Customer Accounts
The del operation is used to remove the specified customer account and all its settings from Plesk database.
Request packet Structure
A request XML packet deleting a customer account from Plesk database includes the del operation node:
<packet>
<customer>
<del>
...
</del>
</customer>
</packet>
The del node does not have a separate type, it is nested within the
ClientTypeRequest complex type (client_input.xsd
). The del
node has the following graphics representation:
Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.9.1/agent_input.svg.
- The filter node is required. It specifies the filtering rule.
Data type: clientSelectionFilterType
(client_input.xsd
). For more information on filters, refer to the Available Filters section.
Response Packet Structure
The del 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.9.1/agent_output.svg.
- The result node is required. It wraps the result of the
requested del operation. Data type: resultType
(
common.xsd
). - The status node is required. It returns the execution status of the del operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is used to return the error code when the del operation fails. Data type: unsignedInt.
- The errtext node is optional. Can be used to return an error message if the del operation fails. Data type: string.
- The filter-id node is optional. Returns the name or ID of a customer depending on a way of customer specification in the request packet. Data type: anySimple.
- The id node is optional. It is required if the del operation succeeds. Returns the unique identifier of the customer account just deleted from Plesk. Data type: integer.
Samples
A single request packet can delete a single or multiple customer accounts. If multiple customer accounts are deleted, they can be filtered by one parameter at a time:
<packet>
<customer>
<del>
<filter>
<id>1324</id>
<id>1325</id>
</filter>
</del>
</customer>
</packet>
Response:
<packet>
<customer>
<del>
<result>
<status>ok</status>
<id>1324</id>
</result>
<result>
<status>ok</status>
<id>1325</id>
</result>
</del>
</customer>
</packet>
You can use some other filtering parameter:
<packet>
<customer>
<del>
<filter>
<login>technolux</login>
<login>advent</login>
</filter>
</del>
</customer>
</packet>
The following packet is invalid as it uses both id and login in the same filter:
<packet>
<customer>
<del>
<filter>
<id>1324</id>
<login>advent</login>
</filter>
</del>
</customer>
</packet>
To fix this packet, use multiple del sections:
<packet>
<customer>
<del>
<filter>
<id>1324</id>
</filter>
</del>
<del>
<filter>
<login>advent</login>
</filter>
</del>
</customer>
</packet>