After a user logon, the system creates a login session, to access protected information from the server use this session. For example, reading event data requires a login session identifier. The API allows reading the login session information and deleting the session.
For reading information about login session use resource with URI
/logon/sessions/{logon_session_id}?endpoint_session_id={endpoint_session_id}
Resource provided by HTTP GET and has these parameters.
Table 3-33 URI parameters for reading information about login session.
|
URI parameter name |
Description |
|---|---|
|
logon_session_id |
Logon session identifier, identifier of session for reading. |
|
endpoint_session_id |
Endpoint session identifier, identifier of endpoint session. |
Resource returns JSON-object, which contain information about login session.
Table 3-34 JSON-object with information about login session.
|
Parameter name |
Description |
|---|---|
|
event_name |
Event name, name of event, which linked to this logon session. |
|
repo_id |
Users’ repository identifier, identifier of users’ repository which used for user logon. |
|
user_id |
User identifier, identifier of user which create this logon session. |
|
repo_obj_id |
For later usage. |
|
sid |
Logon session identifier. |
|
user_name |
User name, user name who create logon session. |
|
data_id |
Event data’s identifier, identifier of event which creates this session. |
On the following example, we try to get information about the session with identifier “9hGUd3xuKE6VX0I8bVMWNeX1zNm0QfNd” from endpoint with session identifier “Wpeg2ek8IvsNF1hFZTXqYjPYvhCdUsZd”.
HTTP GET
https://authserver.example.com/api/v1/logon/sessions/9hGUd3xuKE6VX0I8bVMWNeX1zNm0QfNd?endpoint_session_id=Wpeg2ek8IvsNF1hFZTXqYjPYvhCdUsZd
Response
{
"event_name":"NAM",
"repo_id":"6e0b696e8c2711e4bd9600155d62a8b3",
"user_id":"6f4db9228c2711e4bb4100155d62a8b3",
"repo_obj_id":"2d3c89ccb3ea7b4dacbdfda13e26f450",
"sid":"9hGUd3xuKE6VX0I8bVMWNeX1zNm0QfNd",
"user_name":"COMPANY\\JSmith",
"data_id":"OSLogon"
}
For deleting login session use resource with URI
/logon/sessions/{logon_session_id}?endpoint_session_id={endpoint_session_id}
Resource provided by HTTP DELETE and has these parameters.
Table 3-35 URI parameters for deleting login session.
|
URI parameter name |
Description |
|---|---|
|
logon_session_id |
Logon session identifier, identifier of session for deleting. |
|
endpoint_session_id |
Endpoint session identifier, identifier of endpoint session. |
Method does not return any data, if the method was success method return HTTP 200 status.
On the following example we will delete the logon session with identifier “4Keuv7THWdSMR1H7mPc34O4mGoxTP0TP” with endpoint session identifier “Ex3hqCoF5A2ARWGv221AmPtEkWQDUi0U”.
HTTP DELETE https://authserver.example.com/api/v1/logon/sessions/4Keuv7THWdSMR1H7mPc34O4mGoxTP0TP?endpoint_session_id=Ex3hqCoF5A2ARWGv221AmPtEkWQDUi0U Response HTTP 200