Skip to main content

Participant Sessions

POST /v1/participant/sessions

Get detailed session history for a participant. Sessions are automatically grouped by room when no specific room is requested, with credits consumed and duration tracking.

Features​

  • Room Grouping — Sessions are grouped by room when no roomId is specified
  • Credits Tracking — Shows credits consumed per session (1 credit = 1 minute)
  • CSV Export — Download session data as a formatted CSV file
  • IP Address Logging — Includes IP address for each session when available
  • Active Session Detection — Identifies sessions still in progress

Request​

Headers​

HeaderRequiredDescription
VF-ORG-IDYesYour organization ID
Content-TypeYesapplication/json

Request Body​

{
"uid": "student-123",
"roomId": "math-101",
"startDate": "2024-01-15",
"endDate": "2024-01-20",
"page": 1,
"limit": 10,
"export": "json"
}
FieldTypeRequiredDescription
uidstringYesUnique identifier of the participant
roomIdstringNoFilter by specific room (returns grouped view if omitted)
startDatestringNoFilter from date (ISO format). Defaults to today
endDatestringNoFilter to date (ISO format). Requires startDate
pagenumberNoPage number for pagination (default: 1)
limitnumberNoResults per page, max 10 (default: 10)
exportstringNo"csv" for CSV export, "json" for JSON (default)
Date Filtering
  • If no dates provided: returns sessions from today only
  • If only startDate provided: returns sessions from that single day
  • If both provided: returns sessions within the date range
  • endDate requires startDate — you can't provide only endDate

Response: Grouped by Room (No roomId)​

When no roomId is specified, sessions are grouped by room:

{
"success": true,
"message": "Sessions retrieved successfully",
"data": {
"participant": {
"uid": "student-123",
"name": "Jane Doe",
"role": "STUDENT"
},
"roomGroups": [
{
"roomId": "math-101",
"roomTitle": "Calculus I - Morning Session",
"sessions": [
{
"joinedAt": "2024-01-15T09:05:30.000Z",
"leftAt": "2024-01-15T10:02:15.000Z",
"duration": 3405,
"creditsConsumed": 57,
"ipAddress": "192.168.1.100",
"isActive": false
}
],
"totalDuration": 3405,
"totalCredits": 57,
"sessionCount": 1,
"averageDuration": 3405
}
],
"summary": {
"totalSessions": 5,
"totalDuration": 18000,
"totalCredits": 300,
"roomsAttended": 3,
"averageDuration": 3600,
"dateRange": {
"from": "2024-01-15",
"to": "2024-01-15"
}
},
"pagination": {
"page": 1,
"limit": 10,
"totalRooms": 3,
"hasMore": false
}
}
}

Response: Single Room (With roomId)​

When a roomId is specified, returns flat list of sessions for that room:

{
"success": true,
"message": "Sessions retrieved successfully",
"data": {
"participant": {
"uid": "student-123",
"name": "Jane Doe",
"role": "STUDENT"
},
"room": {
"roomId": "math-101",
"roomTitle": "Calculus I - Morning Session",
"totalDuration": 7200,
"totalCredits": 120,
"averageDuration": 3600
},
"sessions": [
{
"joinedAt": "2024-01-15T09:05:30.000Z",
"leftAt": "2024-01-15T10:02:15.000Z",
"duration": 3405,
"creditsConsumed": 57,
"ipAddress": "192.168.1.100",
"isActive": false
}
],
"summary": {
"totalSessions": 2,
"totalDuration": 7200,
"totalCredits": 120,
"roomsAttended": 1,
"averageDuration": 3600,
"dateRange": {
"from": "2024-01-15",
"to": "2024-01-15"
}
},
"pagination": {
"page": 1,
"limit": 10,
"total": 2,
"hasMore": false
}
}
}

CSV Export​

Set "export": "csv" to download a formatted CSV file. When exporting, pagination limits are ignored and all matching sessions are included.

Example Request​

curl -X POST https://api.verriflo.com/v1/participant/sessions \
-H "VF-ORG-ID: your-organization-id" \
-H "Content-Type: application/json" \
-d '{
"uid": "student-123",
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"export": "csv"
}'

CSV Format: All Rooms​

Participant Session Report

Participant UID,student-123
Participant Name,Jane Doe
Role,STUDENT

Summary
Total Rooms Attended,3
Total Sessions,12
Total Time (minutes),600
Total Credits Consumed,600
Average Session Duration (minutes),50

Room Summary
Room ID,Room Title,Sessions,Total Time (min),Credits Consumed,Avg Session (min)
math-101,"Calculus I",5,300,300,60
physics-101,"Physics Intro",4,200,200,50
chem-101,"Chemistry Basics",3,100,100,33

Detailed Sessions
Room ID,Room Title,Joined At,Left At,Duration (min),Credits,Status,IP Address
math-101,"Calculus I",2024-01-15T09:00:00.000Z,2024-01-15T10:00:00.000Z,60,60,Completed,192.168.1.100
...

CSV Format: Single Room​

When roomId is specified:

Participant Session Report - Single Room

Participant UID,student-123
Participant Name,Jane Doe
Role,STUDENT
Room ID,math-101
Room Title,"Calculus I"

Summary
Total Sessions,5
Total Time (minutes),300
Total Credits Consumed,300
Average Session Duration (minutes),60

Sessions
Session #,Joined At,Left At,Duration (minutes),Credits Consumed,Status,IP Address
1,2024-01-15T09:00:00.000Z,2024-01-15T10:00:00.000Z,60,60,Completed,192.168.1.100
...

Limits​

ScenarioMax Results
Grouped view (no roomId)10 room groups, 10 sessions per group
Single room view10 sessions
CSV exportNo limit

Errors​

StatusMessageDescription
400uid is requiredMissing participant identifier
400startDate is required...endDate provided without startDate
401UnauthorizedInvalid organization ID
422Organization setup...Organization not fully configured

Tip: Use CSV export for monthly attendance reports or integration with spreadsheet tools.