This is documentation for Plesk 12.5.
Go to documentation for the latest version, Plesk Obsidian.
Retrieving Sessions List
Use the get operation to retrieve list of currently opened CP sessions and information on each opened session.
Request Packet
A request XML packet retrieving list of currently opened CP sessions and information on each opened session includes the get operation node:
<packet version="1.5.0.0">
<session>
<get/>
</session>
</packet>
The get node is required. Data type: none.
Response Packet Structure
The get node of the output XML packet is presented by type SessionGetOutputType (updater.xsd
) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: resultType (
common.xsd
). - The status node is required. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the get operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the get operation fails. Data type: string.
- The session node is optional. It holds parameters of opened CP sessions. Data type: Session (
session.xsd
).If the session node is present in the response packet, the following nodes are required:
- The id node specifies the session ID. Data type: string.
- The type node specifies type of user who has started the session. Data type: string. Allowed values: admin | reseller | domain-admin | mail-user | client.
- The ip-address node specifies the user's IP address. Data type: ip_address (
common.xsd
) - The login node holds the user login name. Data type: string.
- The login-time node specifies the moment when the session was started. Data type: date.
- The idle node specifies the moment when the last action was performed by the user. Data type: date.
Samples
A request XML packet retrieving list of currently opened CP sessions and information on each opened session looks as follows:
<packet version="1.5.0.0">
<session>
<get/>
</session>
</packet>
Response:
<packet version="1.5.0.0">
<session>
<get>
<result>
<status>ok</status>
<session>
<id>6a17d01f5e1925601faa86ad22ada6ff</id>
<type>admin</type>
<ip-address>192.0.2.1</ip-address>
<login>admin</login>
<login-time>2007-02-20T05:21:00</login-time>
<idle>2007-02-20T05:37:42</idle>
</session>
<session>
<id>f15cabb0a544df13aee1ee5b55de0530</id>
<type>JimmyJoe</type>
<ip-address>192.0.2.2</ip-address>
<login>client</login>
<login-time>2007-02-21T23:42:00</login-time>
<idle>2007-02-21T23:43:22</idle>
</session>
</result>
</get>
</session>
</packet>