Getting Information About Customer Accounts
The get operation is used to retrieve customer account settings from the database. These settings are as follows:
- General information about a customer (owner, name, company, contact data, and so on)
- Statistics on this customer
To retrieve this information, send a request packet with the get operation to Plesk server.
Request Packet Structure
A request XML packet retrieving information about the customer accounts from Plesk database includes the get operation node:
The get node does not have a separate type, it is nested within the ClientTypeRequest complex type (
client_input.xsd). The get 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 dataset node is required. It indicates the types of information requested from Plesk database. Data type: clientDatasetType (
- The gen_info node is optional. It is used to request for the general customer account settings. Data type: none.
- The stat node is optional. It is used to request statistics on the specified customers. Data type: none.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The get node of the response packet is structured as follows:
- The result node is required. It wraps the result of the requested get operation. Data type: resultType (
- The status node is required. It returns the execution status of the get operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is used to return the error code when the get operation fails. Data type: unsignedInt.
- The errtext node is optional. Can be used to return an error message if the get 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 get operation succeeds. Returns the unique identifier of the customer account whose data is received from Plesk database. Data type: integer.
- The data node is optional. It is present if the get operation succeeds. Returns a requested collection of customer settings. Data type: clientData (
plesk_client.xsd). See the structure of this node below.
The data node is defined by complex type clientData (
plesk_client.xsd). It is structured as follows:
- The gen_info node is optional. It returns a collection of general customer account settings. Data type: clientGetGenInfo (
plesk_client.xsd). See the structure of this node in topic General Customer Account Settings.
- The stat node is optional. It returns a the statistics collected on the specified customer account. Data type: clientStatType (
plesk_client.xsd). See the structure of this node in the Statistics topic.
To get the information about the customer account, specify the packet as follows:
To send a similar packet for multiple customer accounts, use the packet as follows:
You cannot identify multiple customer accounts by different filtering parameters in the same filter section. The following packet is invalid:
To fix it, use multiple get sections: