Reporting Endpoints¶
Note: Every endpoint listed in this document is managing JSON objects, so the path structure shown for nested keys is represented in a JSON-style access pattern.
Scores Per Course¶
Return a list of all the learners who are enrolled in the course, and specifies their completions and scores for the course.
HTTP Verb: GET
Endpoint: /api/v1/reports/scores_per_course/<string:course_id>/?show_users=1
Example Request (cURL):
curl -X GET -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
-H "Content-Type: application/json"
https://<yournamehere>.enfixlp.com/api/v1/reports/scores_per_course/<string:course_id>/?show_users=1
Example Response:
[
{
"user": {
"_id": "51293841bd7a8494f0a3369f",
"username": "tmp12",
"name": "Test User 1",
"email": "tmp12@tmp12.com",
},
"score": "",
"score_date": "",
"total_wall_time": -1,
"passed": false
},
{
"user": {
"_id": "51b1e833bd7a844089b652aa",
"username": "tmp13",
"name": "Test User 2",
"email": "a@e.com",
},
"score": 82,
"total_wall_time": -1,
"score_date": "2016-02-01 21:20:27",
"passed": true
}
]
Student Transcript¶
Return a list of all the courses a learner is enrolled in.
HTTP Verb: GET
Endpoint: /api/v1/reports/student_transcript/<string:user_id>/
Example Request (cURL):
curl -X GET -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
-H "Content-Type: application/json"
https://<yournamehere>.enfixlp.com/api/v1/reports/student_transcript/<string:user_id>/
Example Response:
[
{
"course": {
"_id": "51d5d55dbd7a84058e7bf61c",
"title": "SCO Tester"
},
"started": true,
"passed": true,
"score": 82.0,
"date_achieved": "2019-11-23 08:01:46"
},
{
"course": {
"_id": "5145eb3abd7a844438bb931c",
"title": "Diagnostic SCO"
},
"started": false,
"passed": false,
"score": "",
"date_achieved": ""
}
]