curl --request GET \
--url http://localhost:3000/api/messaging/sessions{
"sessions": [
{
"sessionId": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"lastActivity": "2023-11-07T05:31:56Z",
"metadata": {},
"expiresAt": "2023-11-07T05:31:56Z",
"timeoutConfig": {
"timeoutMinutes": 123,
"autoRenew": true,
"maxDurationMinutes": 123,
"warningThresholdMinutes": 123
},
"renewalCount": 123,
"timeRemaining": 123,
"isNearExpiration": true
}
],
"total": 123,
"stats": {
"totalSessions": 123,
"activeSessions": 123,
"expiredSessions": 123
}
}List all active sessions (admin endpoint)
curl --request GET \
--url http://localhost:3000/api/messaging/sessions{
"sessions": [
{
"sessionId": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"lastActivity": "2023-11-07T05:31:56Z",
"metadata": {},
"expiresAt": "2023-11-07T05:31:56Z",
"timeoutConfig": {
"timeoutMinutes": 123,
"autoRenew": true,
"maxDurationMinutes": 123,
"warningThresholdMinutes": 123
},
"renewalCount": 123,
"timeRemaining": 123,
"isNearExpiration": true
}
],
"total": 123,
"stats": {
"totalSessions": 123,
"activeSessions": 123,
"expiredSessions": 123
}
}Sessions list retrieved successfully
Show child attributes
Unique session identifier
UUID of the agent
UUID of the user
Session creation timestamp
Last activity timestamp
Session metadata
When the session will expire
Current timeout configuration
Show child attributes
Inactivity timeout in minutes
Whether auto-renewal is enabled
Maximum total session duration
Minutes before expiration to trigger warning
Number of times the session has been renewed
Milliseconds until session expiration
Whether the session is within the warning threshold
Total number of active sessions
Was this page helpful?