Session management API
The User Session Management API (version v1).
Download the OpenAPI definition (YAML)
Security schemes
BasicAuth: HTTP basic
OAuth2: oauth2
authorizationCode flow, token URL http://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize
admin
Operations available for privileged users, to be invoked on behalf of another user.
Retrieve active sessions of a given user
GET /{user-id}/sessions
Retrieves information related to the active sessions of a user
identified by the user-id.
Scope(Permission) required: internal_session_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | ID of the user. |
limit | query | integer (int32) | Maximum number of records to return. This parameter is not supported yet. | |
offset | query | integer (int32) | Number of records to skip for pagination. This parameter is not supported yet. | |
filter | query | string | Condition to filter the retrieval of records. This parameter is not supported yet. | |
sort | query | string | Define the order in which the retrieved records should be sorted. This parameter is not supported yet. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successfully retrieved session information. | Sessions |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
404 | Resource Not Found | |
500 | Internal Server Error | Error |
Terminate all sessions of a given user
DEL /{user-id}/sessions
Delete all the sessions of a user identified by the user-id.
Scope(Permission) required: internal_session_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | ID of the user. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | |
400 | Invalid input request | Error |
401 | Unauthorized | |
500 | Internal Server Error | Error |
Retrieve a given active session of a given user
GET /{user-id}/sessions/{session-id}
Retrieves information related to the active session identified
by session-id of a user identified by the user-id.
Scope(Permission) required: internal_session_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | ID of the user. |
session-id | path | string | Yes | ID of the session. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successfully retrieved session information. | Session |
401 | Unauthorized | |
403 | Resource Forbidden | |
404 | Resource Not Found | |
500 | Internal Server Error | Error |
Terminate a given session of a given user
DEL /{user-id}/sessions/{session-id}
Terminate a specific session of a user by the session-id.
Scope(Permission) required: internal_session_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | ID of the user. |
session-id | path | string | Yes | ID of the session. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | |
400 | Invalid input request | Error |
401 | Unauthorized | |
500 | Internal Server Error | Error |
sysadmin
Operations available for privileged users, to be invoked for system management.
Retrieve all active sessions
GET /sessions
Retrieves information related to the active sessions on the system.
Scope(Permission) required: internal_session_view
Parameters
| Name | In | Type | Required | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | query | string | Condition to filter the retrieval of records. The filter parameter must contain at least one valid expression (for multiple expressions they must be combined using the 'and' logical operator). Each expression must contain an attribute name followed by an attribute operator and a value (attribute names, operators and values used in filters are case insensitive). The operators supported in the expression are listed next
The attributes supported in the expression are listed next
Example, filter=loginId eq john and userAgent co Chrome | ||||||||||||||||||||||||||||||||||||||||||||||
limit | query | integer (int32) | Maximum number of records to return. Default value: 20 | ||||||||||||||||||||||||||||||||||||||||||||||
since | query | integer (int64) | Unix timestamp data value that points to the start of the range of data to be returned. Note: As results are ordered by more recent first this will provide previous page of results. | ||||||||||||||||||||||||||||||||||||||||||||||
until | query | integer (int64) | Unix timestamp data value that points to the end of the range of data to be returned. Note: As results are ordered by more recent first this will provide next page of results. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successfully retrieved session information. | SearchResponse |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
500 | Internal Server Error | Error |
Schemas
Application
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique ID of the application. |
subject | string | Yes | Username of the logged in user for the application. |
appName | string | Yes | Name of the application. |
appId | string | Yes | ID of the application. |
Session
Type: object
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | ID of the user of the session. | |
idpName | string | Identity provider name that the session authenticated. Will only be returned for federated authentication sessions. | |
applications | array of Application | List of applications in the session. | |
userAgent | string | User agent of the session. | |
ip | string | IP address of the session. | |
loginTime | string | Login time of the session. | |
lastAccessTime | string | Last access time of the session. | |
id | string | ID of the session. |
Sessions
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | ||
sessions | array of Session | List of active sessions. |
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
description | string | ||
traceId | string |
SearchResponse
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
previous | string (uri) | Endpoint that will return the previous page of data. If not included, this is the first page of data. | |
next | string (uri) | Endpoint that will return the next page of data. If not included, this is the last page of data. | |
Resources | array of Session |
Was this page helpful?