Getting User Account Details
Use the get operation to retrieve the information on user accounts.
Request Packet Structure
A request XML packet retrieving information about user accounts includes the get operation node:
<packet> <user> <get> ... </get> </user> </packet>
The get node is nested within the UserGetInput type (
user.xsd). This node has the following graphics representation:
Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/184.108.40.206/agent_input.svg.
It specifies the filtering rule. Data type: UserSelectionFilterType
(user.xsd). For more information on filters, refer to the Available Filters section.
It indicates the types of information requested from Plesk. Data type: UserDatasetInput (
It is used to request the general account information. Data type: UserGetGenInfo (
It is used to request details on account roles. 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:
Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/220.127.116.11/agent_output.svg.
It wraps the result of the requested operation. Data type: extension of resultType (
It returns the execution status of the operation. Data type: string. Allowed values: ok | error.
Is used to return the error code when the operation fails. Data type: unsignedInt.
Can be used to return an error message if the operation fails. Data type: string.
Returns the filtering rule specified in the request packet. Data type: anySimple.
It is required if the operation succeeds. It returns the unique identifier of the user account for which the data were retrieved. Data type: integer.
It is present if the get operation succeeds. Returns a requested collection of user settings. Data type: UserGetOutputData (
user.xsd). See the structure of this node below.
The data node is structured as follows:
It specifies the general information about the user account. Data type: UserAddGenInfo (
It specifies the e-mail address of the account. Typically, the address contains a name of a site controlled by the account owner. Data type: string.
It specifies the user name. Data type: string.
It specifies the GUID of an account owner. Data type: string.
It specifies the account status. Data type: string. Allowed values:
It contains a GUID of the user account. Data type: string.
If a role is the Admin or Accountant, the node value is true. Otherwise, it is false. Data type: boolean.
It specifies contact information for this user account. Data type: ContactInfoAdd (
user.xsd). To see the node definition, refer to section User Contact Information.
It specifies the ID of the user account in the Panel components. Data type: string.
It specifies the ID of the domain to which the user has access. Data type: string.
It specifies the user's email address. Data type: string.
If a user has an associated mail account, this parameter will show its ID. Data type: string.
It specifies the user account role settings. Data type: UserAddRoles (
It specifies the name of a role assigned to the account. Data type: string.
A request packet to get a user account details can look as follows:
<packet> <user> <get> <filter> <guid>96197aa9-389a-db5b-aadc-88350b24fcdd</guid> </filter> <dataset> <gen-info/> </dataset> </get> </user> </packet>
<packet version="18.104.22.168"> <user> <get> <result> <status>ok</status> <filter-id>96197aa9-389a-db5b-aadc-88350b24fcdd</filter-id> <id>1</id> <data> <gen-info> <login>admin</login> <name>Eugene Grin</name> <owner-guid>58bb9092-4c8b-4110-ba3d-c40bdad3b178</owner-guid> <status>enabled</status> <guid>96197aa9-389a-db5b-aadc-88350b24fcdd</guid> <is-built-in>1</is-built-in> <contact-info> <company>Grin LLC</company> <phone>0-000-0000000</phone> <fax/> <address>New York</address> <city>New York</city> <state>New York</state> <zip>10101</zip> <country>US</country> </contact-info> <external-id/> </gen-info> </data> </result> </get> </user> </packet>