Is there any way to get a list of sessions that are active?
Get a list of Sessions
Collapse
X
-
GetSessionIdList will return a list of all the DMCC Session IDs that are opened by this CTI user. This includes sessions opened using WTI and directly via DMCC.
Example:
API Call: /api/fe/v1/GetSessionIdList
body:
{}
======== Incoming WTI Response =============
{"GetSessionIdListResponse": {"sessionIDList": {"sessionID": [
"A999713208B1CF0AD942946346ECC486-78",
"2E2E4F2670066408C1D9282BB9FFE5CA-81",
"C708019565C971EF2755604B39CC6A0E-77",
"07F2120ED6EACABC282940BCE7B4191E-82"
]}}}Last edited by jtb1; 10-03-2024, 09:48 AM.
-
-
I just downloaded the newest sdk's.. and I am seeing this endpoint. The blurb it gives is:
Since it says "...that were established by the user name." I'm assuming I have to pass the same username and password I use for the ApplicationSession endpoint. However, when I do that, I get a 410 unauthorized response. I must be missing something?This is a request to get the list of session identifiers that were established by the user name.
The GetDeviceIdListId request has no parameters:
The list of session identifiers is returned in the GetSessionIdListResponse.
There are no events generated from a GetSessionIdList request.
Thanks!!
Dave
Dave Morrison
Software Engineer
Comment
-
-
I'm not quite sure how to do that. I'm calling the "GetSessionIdList" endpoint though, just in case you mis-read that. It says it doesn't have any parameters, so I can't pass anything in the body. Since it says "...get the list of session identifiers that were established by the user name.", that would mean I need to include the user name somewhere. Since I can't pass parameters, the only other thing I can think of is the username that I use to create a session..Originally posted by jtb1 View PostI believe you have to create a session first and then send the GetDeviceIdListId in the context of that session.
Thanks for the response!
DaveLast edited by jtb1; 10-03-2024, 10:29 AM.Dave Morrison
Software Engineer
Comment
-
-
Ok, this actually did work. Once I created an application session, it returns a token and a session Id. I can use the token to get all the sessions that are still active for this application.. if that makes sense. So I first called this endpoint:
ApplicationSession and it generated this payload:
I called the above endpoint a second time so I had two active sessions.Code:{ "token": "mytokenwashere", "sessionID": "mysessionidwashere", "actualSessionDuration": 300, "actualProtocolVersion": "10.1.0.2" }
I then used one of the generated tokens, I don't think it matters which you use, for the following endpoint and it shows the two sessions:
GetSessionIdList, passing no parameters, and it returned this payload:
Once the sessions either times out, or you kill it, it drops off that list..Code:{ "GetSessionIdListResponse": { "sessionIDList": { "sessionID": [ "AE7574FBD21B08230BE8D1E257F5DC8C-907", "A53296F81E52689819410B3CEA6B32E9-908" ] } } }
Hope this helps someone else!
DaveLast edited by avc859587618170; 10-03-2024, 01:08 PM.Dave Morrison
Software Engineer
Comment
-

.
Comment