This is documentation for Plesk 12.5.
Go to documentation for the latest version, Plesk Obsidian.
Setting Customer Account Properties
The set operation is used to update Plesk customer account settings.
Request Packet Structure
A request XML packet setting various settings for the specified customer account includes the set operation node:
<packet version="1.6.3.0">
<customer>
<set>
...
</set>
</customer>
</packet>
The set node does not have a separate type, it is nested within the ClientTypeRequest complex type (client_input.xsd
). The set node has the following graphics representation:
- 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. - The values node is required. It is used to specify the categories of settings that will be set to Plesk database. Data type: none.
- The gen_info node is optional. It specifies a collection of general settings. Data type: clientSetGenInfo (
plesk_client.xsd
). See the structure of this node in topic General Customer Account Settings.
- The gen_info node is optional. It specifies a collection of general settings. Data type: clientSetGenInfo (
Response Packet Structure
The set node of the response packet is structured as follows:
- The result node is required. It wraps the result of the requested set operation. Data type: resultType (
common.xsd
). - The status node is required. It returns the execution status of the set operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is used to return the error code when the set operation fails. Data type: unsignedInt.
- The errtext node is optional. Can be used to return an error message if the set 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 set operation succeeds. Returns the unique identifier of the customer account just updated. Data type: integer.
Samples
Changing a customer GUID
You can change a customer GUID using the following packet:
<packet version="1.6.7.0">
<customer>
<set>
<filter>
<login>MyClient</login>
</filter>
<values>
<gen_info>
<guid/>
</gen_info>
</values>
</set>
</customer>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<customer>
<set>
<result>
<status>ok</status>
<filter-id>MyClient/filter-id>
<id>4</id>
</result>
</set>
</customer>
</packet>
Changing GUIDs of all customers
To change GUIDs of all customers, use the following packet:
<packet version="1.6.7.0">
<customer>
<set>
<filter/>
<values>
<gen_info>
<guid/>
</gen_info>
</values>
</set>
</customer>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<customer>
<set>
<result>
<status>ok</status>
<filter-id>3</filter-id>
<id>3</id>
</result>
<result>
<status>ok</status>
<filter-id>4</filter-id>
<id>4</id>
</result>
</set>
</customer>
</packet>