API V1 of Training
Material
- GET /api-training/v1/material/list
To get list of material file: PDF, Slide, Video
- Query Parameters
audience (string) – VMW/HC/OD
category (string) – MIS/M&E/EPI/Finance/VMW/Education
place_code (string) – code of village / code of HF
Response as json:
{ "code": 200, "message": "success", "data": [ { "Material_ID": 1, "Title": "Documentation", "Source": "52.168.163.48/media/Training/name.pdf", "Type": "PDF", "Category": "MIS", "Code_Vill_T": "0102010300", "Thumbnail": "52.168.163.48/media/Training/e-learning.png", "IsRead": 0 } ] }
- Object
Type (string) – type of Source. e.g: PDF, Slide, Video.
Audience (string) – OD/HC/VMW.
Source (string) – URL
Category (string) – MIS/M&E/EPI/Finance/VMW/Education
IsRead (bit) – 0/1
Update status material
- POST /api-training/v1/material/update_status
To update status weather material training is read or not yet.
Parse as json:
{ "Code_Place" : "0102010300", "Material_ID" : 1, "IsRead": 1 }
- Object
Code_Place (string) – code of Village / code of HF
Material_ID (string) – Rec_ID of material training
IsRead (bit) – 0/1, if not yet read the value is 0 otherwise is 1.
Quiz list
- GET /api-training/v1/quiz/list
To get list of Quiz
- Query Parameters
category (string) – MIS/M&E/EPI/Finance/VMW/Education
candidate (string) – VMW/HC
Response as json:
{ "code": 200, "message": "success", "data": [ { "Rec_ID": 1, "Title": "ការរាយការអំពីជំងឺគ្រុនចាញ់", "Description": "រាយការតាមប្រពន្ទ", "Category": "MIS", "Candidate": "VMW" } ] }
Quiz Question
- GET /api-training/v1/quiz/questions
To get list of Questionaire.
- Query Parameters
quiz_id (int) – Rec_Id of quiz
Response as json:
{ "code": 200, "message": "success", "data": [ { "QuestionID": 1, "Question": "តើមួយថ្ងៃមានប៊ុន្មានម៉ោង?", "Answers": [ { "Rec_ID": 1, "Answer": "245h", "IsCorrect": 1, "QuestionID": 1 }, { "Rec_ID": 2, "Answer": "23h", "IsCorrect": 1, "QuestionID": 1 }, { "Rec_ID": 3, "Answer": "20h", "IsCorrect": 0, "QuestionID": 1 }, { "Rec_ID": 4, "Answer": "21h", "IsCorrect": 0, "QuestionID": 1 } ] }, { "QuestionID": 4, "Question": "តើមួយឆ្នាំមានប៊ុន្មានថ្ងៃ?", "Answers": [ { "Rec_ID": 13, "Answer": "233", "IsCorrect": 0, "QuestionID": 4 }, { "Rec_ID": 14, "Answer": "365", "IsCorrect": 1, "QuestionID": 4 }, { "Rec_ID": 15, "Answer": "555", "IsCorrect": 0, "QuestionID": 4 }, { "Rec_ID": 16, "Answer": "55", "IsCorrect": 0, "QuestionID": 4 } ] } ] }
- Object
IsCorrect (bit) – if it is a correct answer its value is
1otherwise0Candidate (string) – OD/HC/VMW.
Category (string) – MIS/M&E/EPI/Finance/VMW/Education
Answer Question
- POST /api-training/v1/quiz/answer_question
To answer the question of quiz.
Parse as json:
{ "quiz_take" : { "QuizID":"1", "Code_Place":"010101", "TotalScore":10, "StartTime": "2022-03-04 10:10:00", "EndTime": "2022-03-04 10:14:00" }, "answers": [ { "QuestionID":"1", "AnswerID":"1" }, { "QuestionID":"1", "AnswerID":"1" } ] }
Profile
- GET /api-training/v1/quiz/profile
To get profil and result.
- Query Parameters
Code_Place (string) – Code of village / code of HF
Response as json:
{ "code": 200, "message": "success", "data": [ { "Code_Place": "010101", "Name_Place": "Serei Sophon RH", "QuizID": 1, "Title": "ការរាយការអំពីជំងឺគ្រុនចាញ់", "StartTime": "2022-03-04 10:10:00.000", "EndTime": "2022-03-04 10:14:00.000", "TotalScore": 10 } ] }
Comment
Comment List
- GET api-training/v1/comment/list
List of comment of any material lesson
- Query Parameters
code_place (string) – code of health facility / village code / name of CNM user
material_id (int) – rec_id of lesson.
Response as json:
{ "code": 200, "message": "success", "data": [ { "Rec_ID": 1, "Code_Place": "010102", "Text": "I don't know this one ", "Parent_ID": null, "Material_ID": 1, "IsRead": 0, "InitTime": "2022-03-18 00:00:00.000" }, { "Rec_ID": 2, "Code_Place": "CNM", "Text": "I can explain you", "Parent_ID": 1, "Material_ID": 1, "IsRead": 0, "InitTime": "2022-03-18 00:00:00.000" }, { "Rec_ID": 3, "Code_Place": "010102", "Text": "Hello", "Parent_ID": 1, "Material_ID": 1, "IsRead": 0, "InitTime": "2022-03-18 10:03:06.493" } ] }