V11 SP8

REST API - GET Session Details


This operation returns a list of sessions for a user. The API applies to all Commvault consoles, all mobile applications, and the command line interface.



GET <webservice>/Session?userId={userId} HTTP/1.1
Host: <host name>
Accept: application/xml
Authtoken: <authentication token>

where <webservice> is the root path used to route the API requests to the Web Server.

For more information, see Available Web Services for REST API.

Request Parameters

Name Description Required
userId The user ID for the user. If the user ID is not known, use the GET User API to retrieve it. Yes

Request Headers

Name Description
Host The host name of the Web Server or Web Console used in the API request.
Accept The format of the response. Valid values are: application/xml or application/json.
Authtoken The authentication token received after successfully logging on. For details on receiving an authentication token, see Authentication.


An .xml file is not needed.


Response Parameters

Parameter Description Element
logoutTime The time the user logged off.

Valid values are:

  • 0, if the user did not log off
  • UNIX-style timestamps (seconds since January 1, 1970)
loginTime The time the user logged on.

Valid values are UNIX-style timestamps (seconds since January 1, 1970).

host The host name of the machine where the user is logged on. sessions
sessionId The system-generated ID assigned to the session. sessions
browserSessionId The system-generated ID assigned to the browser session. sessions
consoleType Where the user is logged on.

Valid values are:

  • 5, for the CommCell Console
  • 13, for the command line interface
  • 14, for the CommCell Console as a remote web-based application
  • 19, for the Web Console and mobile applications
userName The name of the user. user
userId The system-generated ID assigned to the user. user


Sample Request

GET <webservice>/Session?userId=10 HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6

Sample Response

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
  <sessions logoutTime="1453394214" loginTime="1453328412" host="host002" description="" sessionId="EMCAE92D1DD-0C68-49A6-BEBB-404D96D7A4BF" browserSessionId="3" consoleType="5">
    <user userName="jsmith" userId="10" />