List Sessions
get
/sessions
Returns a list of session currently active for a user or request.
Request
Query Parameters
-
application:
Application name.
-
database:
Database name.
-
userId:
User ID for whom to return the active sessions. If not provided, all the sessions are retrieved.
Response
200 Response
OK
Session details returned successfully.
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"
} ]