Get cluster user sessions
This page will soon be available only on the dedicated Dynatrace Managed Documentation site. Update your bookmarks.
This API call gets users sessions based on a specific user ID. You can request a list of user sessions for a specific user ID in a specific environment.
Authentication
To execute this request, you need the Service Provider API (ServiceProviderAPI
) permission assigned to your API token. Generate your API token via Cluster Management Console (CMC). To learn how to obtain and use it, see Cluster API - Authentication.
Endpoint
/api/cluster/v2/userSessions
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
userId | string | User ID (optional) | query | optional |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | UserSession[] | Success |
500 | - | Operation failed |
Response body objects
The ResponseBody
object
The UserSession
object
Managed user session instance
Element | Type | Description |
---|---|---|
userId | string | User id |
nodeId | integer | Node on which user session exists |
sessionId | string | User session id |
creationTime | integer | User session creation timestamp |
lastAccessedTimestamp | integer | Timestamp when session was recently accessed |
tenantUuid | string | UUID of tenant to which user has logged in (or cluster UUID if user has logged in to CMC) |
loginType | string | The way user has logged in
|
device | string | Device on which user has logged in |
ip | string | IP from which has logged in |
Response body JSON model
1[2 {3 "userId": "string",4 "nodeId": 1,5 "sessionId": "string",6 "creationTime": 1,7 "lastAccessedTimestamp": 1,8 "tenantUuid": "string",9 "loginType": "LOCAL",10 "device": "string",11 "ip": "string"12 }13]
Example
In this example, the request lists user sessions in the myManaged.cluster.com
cluster for user user.name
.
Curl
1curl -X GET "https://myManaged.cluster.com/api/cluster/v2/userSessions?userId=user.name"2 -H "accept: application/json"
Request URL
1https://myManaged.cluster.com/api/cluster/v2/userSessions?userId=user.name
Response body
1[2 {3 "userId": "user.name",4 "nodeId": 4,5 "sessionId": "string",6 "creationTime": 0,7 "lastAccessedTimestamp": 0,8 "tenantUuid": "string",9 "loginType": "LOCAL",10 "device": "string",11 "ip": "string"12 }13]
Response code
200