List Sessions
/essbase/rest/v1/sessions
Returns a list of session currently active for a user or request.
Request
-
application: string
Application name.
-
database: string
Database name.
-
userId: string
User ID for whom to return the active sessions. If not provided, all the sesions are retrieved.
Response
- application/json
- application/xml
200 Response
Session details returned successfully.
object
-
application:
string
Name of active application.
-
connectionSource:
string
Host name of the connected service.
-
database:
string
Name of active database.
-
dbConnectTimeInSeconds:
string
Number of seconds ago the database was set active.
-
loginTimeInSeconds:
string
Number of seconds ago the session began.
-
request:
string
Type of active request in progress; for example, calculation, data load, or restructure. This information can help you get details about what is occurring during lengthy sessions.
-
requestState:
string
The status of the active request.
-
requestTimeInSeconds:
string
Number of seconds the active request has been running.
-
sessionId:
string
Numeric session ID.
-
userId:
string
Logged in user name.
400 Response
Bad Request
Essbase or platform security exception.
500 Response
Internal Server Error.
Examples
The following example shows how to list all active user sessions on the Essbase Server.
This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat
.
Script with cURL Command
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/sessions?links=none" -H Accept:application/json -H Content-Type:application/json -u %User%:%Password%
Example of Response Body
[ {
"userId" : "admin",
"sessionId" : "2790260182",
"loginTimeInSeconds" : "200",
"connectionSource" : "https://myserver.example.com"
}, {
"userId" : "user1",
"sessionId" : "4178574804",
"loginTimeInSeconds" : "72",
"connectionSource" : "https://myserver.example.com"
}, {
"userId" : "power1",
"sessionId" : "3468688851",
"loginTimeInSeconds" : "4",
"connectionSource" : "https://myserver.example.com"
} ]