Core - Authenticated Sessions
This modules manages the authenticated sessions
The base url for the APIs in this page is at:
/api/admin
A JSON file with OpenAPI data about all core-related admin APIs can be downloaded here
.
Get users active sessions
Gets the list of all users active sessions (it’s a Paged List APIs, as explained in the introduction):
- GET /v1/authenticated-sessions/list
Gets the list of authenticated users with active session count
- Status Codes
200 OK – Success
Returns a Json with the list of users authenticated sessions:
{
[
{
"UserGuid": "83bde819-ec08-4cee-b635-884145630d0b", //Guid
"UserName": "user", //String
"SessionCount": 1, //Int
"IsOperator": true //Boolean
},
{
"UserGuid": "90b10bb2-8c70-456f-b960-2251ae6d8778", //Guid
"UserName": "user2", //String
"SessionCount": 4, //Int
"IsOperator": false //Boolean
},
...
]
}
Get specified user active sessions
Gets the list of all active sessions for the specified user (it’s a Paged List APIs, as explained in the introduction):
- GET /v1/authenticated-sessions/user-sessions/{guid}
Gets list of active session for authenticated user
- Parameters
guid (string) – The guid of the user
- Status Codes
200 OK – Success
Returns a Json with the list of authenticated sessions corresponding to the guid provided:
{
[
{
"ID": 275, //Int
"UserID": 4, //Int
"UserGuid": "83bde819-ec08-4cee-b635-884145630d0b", //Guid
"LastUpdated": "2020-09-21T10:42:50Z", //DateTime
"ExpirationDate": "2020-09-23T10:42:50Z", //DateTime
"UserName": "user", //String
"IsOperator": true, //Boolean
"Smartphone": "-", //String (nullable)
"OperatingSystem": "Other- v. ", //String (nullable)
"Application": "Other- v. " //String (nullable)
},
...
]
}
Revoke specified session
Marks a specified session as revoked
With a request body like this:
{
Session: 123, // Int
}
The field Session
contains the Session ID
If the request is successful, it will return a plain Json positive response, otherwise a error message.
Some of the possible error messages are:
err_NoActiveSession
No active session was found for the provided session ID