Get Class Usage Report
This API call is used to get the total duration and total productivity percentage of attendees. If you pass a specific userId, it will return user specific data.
Method : POST
Base URL : https://api.braincert.com
API Endpoint : /v2/getclassreport?apikey=YOUR_API_KEY_HERE
All requests are POST
and sent to https://api.braincert.com/v2/getclassreport?apikey=YOUR_API_KEY_HERE You will retrieve results assuming you have added your appKey, and require parameter.
Request parameters
Parameter | Type | Description | Example |
classId | required | Class id | 12 |
userId | optional | User id | 10 |
isTeacher | optional | Class Teacher | - 0 for Student - 1 for Teacher |
format | optional | Response data format | xml for XML response, default JSON response |
Response XML Example
https://api.braincert.com/v2/getclassreport?apikey=WbMlO5sAx1fmV&format=xmlSuccess Response
<xml>
<report>
<classId>1973</classId>
<userId>1254</userId>
<duration>00:06:00</duration>
<percentage>9.91%</percentage>
<attendance>Yes</attendance>
<time_in>Jun 14, 2017 02:54:19 AM</time_in>
<time_out>Jun 14, 2017 03:54:19 AM</time_out>
</report>
</xml>
Error Response
<rsp status="error">
<errors> error </errors >
</rsp>
Response JSON Example
https://api.braincert.com/v2/getclassreport?apikey=WbMlO5sAx1fmVSuccess Response
[{
"classId":"1973",
"userId":"1254",
"duration":"00:08:55",
"percentage":"9.91%",
"attendance":"Yes",
"session":
[{
"time_in":"Jun 14, 2017 03:01:21 AM",
"time_out":"Jun 14, 2017 02:54:49 AM"
},{
"time_in":"Jun 14, 2017 02:55:02 AM",
"time_out":"Jun 14, 2017 03:01:21 AM"
},{
"time_in":"Jun 14, 2017 03:45:08 AM",
"time_out":"Jun 14, 2017 03:46:58 AM"
}]
}]