User Tools

Site Tools


api2:data:learning_sessions

**This is an old revision of the document!** ----

A PCRE internal error occured. This might be caused by a faulty plugin

To group Events or Objective Student Assessments together, it is possible to declare Learning Sessions. A Learning Session has a starting and an ending time, and the Events or Objective Student Assessments which are dated between these limits are parts of this learning session.\\ ===Object resources=== ^ Property ^ Type ^ Description ^ | id | Integer | identifier for the database of Domoscio's API | | student_id | Integer | Identifier of the student | | starting_time | DateTime | Starting Time of the session | | ending_time | DateTime | Ending Time of the session | | created_at | DateTime | Date of creation of the object | | updated_at | DateTime | Last time the object has been modified | ===CREATE (POST)=== ^ Method | POST | ^ URL | /learning_sessions | ==Parameters (*Requiered parameters)== ^ Property ^ Type ^ Description/expected values | | student_id or uid* | Integer or String | Identifier of the student | | starting_time* | DateTime | Starting Time of the session | | ending_time* | DateTime | Ending Time of the session | ==Send the request (JSON input example)== <code> { "student_id": 4, "starting_time": "2019-05-20 14:43:31", "ending_time": "2019-05-20 14:45:31" } </code> ==Get the response (JSON output example)== <code> { "id": 1, "student_id": 4, "starting_time": "2019-05-20T14:43:31.000Z", "ending_time": "2019-05-20T14:45:31.000Z", "instance_id": 2, "created_at": "2019-05-20T12:44:02.246Z", "updated_at": "2019-05-20T12:44:02.246Z" } </code> ===FETCH (GET)=== ^ Method | GET| ^ URL | /learning_sessions/{learning_session_id} | If no learning session id is provided it will fetch all the Learning Sessions for your instance. You can choose to filter the Learning Sessions by providing the following parameters: ^ Property ^ Type ^ Description ^ | student_id or uid | Integer or String | Identifier of the student | | date start | DateTime | Filter the learning sessions which started after date start | | date end | DateTime | Filter the learning sessions which endend before date end | ==Get the response (JSON output example)== **With ID provided**\\ <code> { "id": 1, "student_id": 4, "starting_time": "2019-05-20T14:43:31.000Z", "ending_time": "2019-05-20T14:45:31.000Z", "created_at": "2019-05-20T12:44:02.246Z", "updated_at": "2019-05-20T12:44:02.246Z" } </code> **Without ID provided**\\ <code> [ { "id": 1, "student_id": 4, "starting_time": "2018-05-20T14:43:31.000Z", "ending_time": "2018-05-20T14:45:31.000Z", "created_at": "2019-05-20T12:44:02.246Z", "updated_at": "2019-05-20T12:44:02.246Z" }, { "id": 2, "student_id": 4, "starting_time": "2019-05-20T14:43:31.000Z", "ending_time": "2019-05-20T14:45:31.000Z", "created_at": "2019-05-20T12:55:46.394Z", "updated_at": "2019-05-20T12:55:46.394Z" }, { "id": 3, "student_id": 4, "starting_time": "2019-05-21T14:43:31.000Z", "ending_time": "2019-05-21T14:45:31.000Z", "created_at": "2019-05-20T12:55:57.700Z", "updated_at": "2019-05-20T12:55:57.700Z" } ] </code> ===GET ADVICES (GET)=== ^ Method | GET| ^ URL | /learning_sessions/get_advices | ^ Property ^ Type ^ Description ^ | learning_session_id or uid | Integer or String | Identifier of the learning session | | type | String | Filter the learning sessions which started after date start |

api2/data/learning_sessions.1558510582.txt.gz · Last modified: 2019/05/22 09:36 by maries