User Tools

Site Tools


api2:data:learning_sessions

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
api2:data:learning_sessions [2019/05/20 15:24]
maries created
api2:data:learning_sessions [2019/05/23 17:56] (current)
maries
Line 4: Line 4:
 ^ Property ​    ^ Type      ^ Description ​        ^ ^ Property ​    ^ Type      ^ Description ​        ^
 | id | Integer | identifier for the database of Domoscio'​s API | | id | Integer | identifier for the database of Domoscio'​s API |
 +| uid | String | The ID of this learning_session in your Database ​ |
 +| payload | jsonb | Information about the learning_session |
 | student_id | Integer | Identifier of the student | | student_id | Integer | Identifier of the student |
 | starting_time | DateTime | Starting Time of the session | | starting_time | DateTime | Starting Time of the session |
Line 19: Line 21:
 ^ Property ^ Type ^ Description/​expected values | ^ Property ^ Type ^ Description/​expected values |
 | student_id or uid* | Integer or String | Identifier of the student | | student_id or uid* | Integer or String | Identifier of the student |
 +| uid | String | The ID of this learning_session in your Database ​ |
 +| payload | jsonb | Information about the learning_session |
 | starting_time* | DateTime | Starting Time of the session | | starting_time* | DateTime | Starting Time of the session |
 | ending_time* | DateTime | Ending Time of the session | | ending_time* | DateTime | Ending Time of the session |
Line 27: Line 31:
 { {
  "​student_id":​ 4,  "​student_id":​ 4,
 +        "​uid":​ "​LS4",​
 +        "​payload":​ {},
  "​starting_time":​ "​2019-05-20 14:​43:​31",​  "​starting_time":​ "​2019-05-20 14:​43:​31",​
  "​ending_time":​ "​2019-05-20 14:​45:​31"​  "​ending_time":​ "​2019-05-20 14:​45:​31"​
Line 37: Line 43:
 { {
     "​id":​ 1,     "​id":​ 1,
 +    "​uid":​ "​LS4",​
 +    "​payload":​ {},
     "​student_id":​ 4,     "​student_id":​ 4,
     "​starting_time":​ "​2019-05-20T14:​43:​31.000Z",​     "​starting_time":​ "​2019-05-20T14:​43:​31.000Z",​
Line 46: Line 54:
 </​code>​ </​code>​
  
-===Fetch (GET)===+===FETCH (GET)===
  
 ^ Method | GET| ^ Method | GET|
Line 66: Line 74:
     "​id":​ 1,     "​id":​ 1,
     "​student_id":​ 4,     "​student_id":​ 4,
 +    "​uid":​ "​LS4"​
 +    "​payload":​ {},
     "​starting_time":​ "​2019-05-20T14:​43:​31.000Z",​     "​starting_time":​ "​2019-05-20T14:​43:​31.000Z",​
     "​ending_time":​ "​2019-05-20T14:​45:​31.000Z",​     "​ending_time":​ "​2019-05-20T14:​45:​31.000Z",​
Line 80: Line 90:
         "​id":​ 1,         "​id":​ 1,
         "​student_id":​ 4,         "​student_id":​ 4,
 +        "​uid":​ "​LS1"​
 +        "​payload":​ {},
         "​starting_time":​ "​2018-05-20T14:​43:​31.000Z",​         "​starting_time":​ "​2018-05-20T14:​43:​31.000Z",​
         "​ending_time":​ "​2018-05-20T14:​45:​31.000Z",​         "​ending_time":​ "​2018-05-20T14:​45:​31.000Z",​
Line 88: Line 100:
         "​id":​ 2,         "​id":​ 2,
         "​student_id":​ 4,         "​student_id":​ 4,
 +        "​uid":​ "​LS2"​
 +        "​payload":​ {},
         "​starting_time":​ "​2019-05-20T14:​43:​31.000Z",​         "​starting_time":​ "​2019-05-20T14:​43:​31.000Z",​
         "​ending_time":​ "​2019-05-20T14:​45:​31.000Z",​         "​ending_time":​ "​2019-05-20T14:​45:​31.000Z",​
         "​created_at":​ "​2019-05-20T12:​55:​46.394Z",​         "​created_at":​ "​2019-05-20T12:​55:​46.394Z",​
         "​updated_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>​ </​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 | Type of the advice. Can be "​all",​ "​good_unusual",​ "​good_usual",​ "​bad_usual",​ "​bad_unusual" ​ |
 +
 +==Send the request (JSON input example)==
 +
 +<​code>​
 +{
 + "​student_id":​4,​
 + "​learning_session_uid":"​LS4",​
 + "​type":"​all"​
 +}
 +</​code>​
 +
 +==Get the response (JSON output example)==
 +
 +<​code>​
 +{
 +    "​learning_session":​ {
 +        "​id":​ 4,
 +        "​uid":​ "​LS4",​
 +        "​student_id":​ 4,
 +        "​starting_time":​ "​2019-05-20T14:​43:​31.000Z",​
 +        "​ending_time":​ "​2019-05-20T14:​45:​31.000Z",​
 +        "​payload":​ null,
 +        "​created_at":​ "​2019-05-23T09:​25:​05.529Z",​
 +        "​updated_at":​ "​2019-05-23T15:​29:​36.501Z"​
 +    },
 +    "​advices":​ [
 +        {
 +            "​type":​ "​good_usual",​
 +            "​specific_advices":​ [
 +                {
 +                    "​objective_student_assessment":​ {
 +                        "​id":​ 3,
 +                        "​objective_student_id":​ 7,
 +                        "​mark":​ 100,
 +                        "​success_threshold":​ null,
 +                        "​knowledge_node_update":​ true,
 +                        "​created_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​updated_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​payload":​ null,
 +                        "​start_date":​ "​2019-05-20T14:​44:​31.000Z",​
 +                        "​end_date":​ "​2019-05-20T14:​45:​22.000Z"​
 +                    },
 +                    "​content":​ {
 +                        "​id":​ 13,
 +                        "​uid":​ "​C2",​
 +                        "​type":​ "​Read",​
 +                        "​name":​ null,
 +                        "​content_url":​ null,
 +                        "​format":​ null,
 +                        "​created_at":​ "​2019-04-29T11:​48:​00.008Z",​
 +                        "​updated_at":​ "​2019-04-29T11:​48:​00.008Z"​
 +                    }
 +                },
 +                {
 +                    "​objective_student_assessment":​ {
 +                        "​id":​ 3,
 +                        "​objective_student_id":​ 7,
 +                        "​mark":​ 100,
 +                        "​success_threshold":​ null,
 +                        "​knowledge_node_update":​ true,
 +                        "​created_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​updated_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​payload":​ null,
 +                        "​start_date":​ "​2019-05-20T14:​44:​31.000Z",​
 +                        "​end_date":​ "​2019-05-20T14:​45:​22.000Z"​
 +                    },
 +                    "​content":​ {
 +                        "​id":​ 15,
 +                        "​uid":​ "​C3",​
 +                        "​type":​ "​Read",​
 +                        "​name":​ null,
 +                        "​content_url":​ null,
 +                        "​format":​ null,
 +                        "​created_at":​ "​2019-04-29T11:​51:​14.814Z",​
 +                        "​updated_at":​ "​2019-04-29T11:​51:​14.814Z"​
 +                    }
 +                }
 +            ]
 +        },
 +        {
 +            "​type":​ "​good_unusual",​
 +            "​specific_advices":​ [
 +                {
 +                    "​objective_student_assessment":​ {
 +                        "​id":​ 3,
 +                        "​objective_student_id":​ 7,
 +                        "​mark":​ 100,
 +                        "​success_threshold":​ null,
 +                        "​knowledge_node_update":​ true,
 +                        "​created_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​updated_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​payload":​ null,
 +                        "​start_date":​ "​2019-05-20T14:​44:​31.000Z",​
 +                        "​end_date":​ "​2019-05-20T14:​45:​22.000Z"​
 +                    },
 +                    "​content":​ {
 +                        "​id":​ 13,
 +                        "​uid":​ "​C2",​
 +                        "​type":​ "​Read",​
 +                        "​name":​ null,
 +                        "​content_url":​ null,
 +                        "​format":​ null,
 +                        "​created_at":​ "​2019-04-29T11:​48:​00.008Z",​
 +                        "​updated_at":​ "​2019-04-29T11:​48:​00.008Z"​
 +                    }
 +                }
 +            ]
 +        },
 +        {
 +            "​type":​ "​bad_usual",​
 +            "​specific_advices":​ [
 +                {
 +                    "​objective_student_assessment":​ {
 +                        "​id":​ 3,
 +                        "​objective_student_id":​ 7,
 +                        "​mark":​ 100,
 +                        "​success_threshold":​ null,
 +                        "​knowledge_node_update":​ true,
 +                        "​created_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​updated_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​payload":​ null,
 +                        "​start_date":​ "​2019-05-20T14:​44:​31.000Z",​
 +                        "​end_date":​ "​2019-05-20T14:​45:​22.000Z"​
 +                    },
 +                    "​content":​ {
 +                        "​id":​ 13,
 +                        "​uid":​ "​C2",​
 +                        "​type":​ "​Read",​
 +                        "​name":​ null,
 +                        "​content_url":​ null,
 +                        "​format":​ null,
 +                        "​created_at":​ "​2019-04-29T11:​48:​00.008Z",​
 +                        "​updated_at":​ "​2019-04-29T11:​48:​00.008Z"​
 +                    }
 +                }
 +            ]
 +        },
 +        {
 +            "​type":​ "​bad_unusual",​
 +            "​specific_advices":​ [
 +                {
 +                    "​objective_student_assessment":​ {
 +                        "​id":​ 3,
 +                        "​objective_student_id":​ 7,
 +                        "​mark":​ 100,
 +                        "​success_threshold":​ null,
 +                        "​knowledge_node_update":​ true,
 +                        "​created_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​updated_at":​ "​2019-05-23T12:​31:​03.613Z",​
 +                        "​payload":​ null,
 +                        "​start_date":​ "​2019-05-20T14:​44:​31.000Z",​
 +                        "​end_date":​ "​2019-05-20T14:​45:​22.000Z"​
 +                    },
 +                    "​content":​ {
 +                        "​id":​ 12,
 +                        "​uid":​ "​C1",​
 +                        "​type":​ "​Evaluation",​
 +                        "​name":​ null,
 +                        "​content_url":​ null,
 +                        "​format":​ null,
 +                        "​created_at":​ "​2019-04-29T11:​47:​41.695Z",​
 +                        "​updated_at":​ "​2019-04-29T11:​47:​41.919Z"​
 +                    }
 +                }
 +            ]
 +        }
 +    ]
 +}
 +</​code>​
  
api2/data/learning_sessions.1558358690.txt.gz · Last modified: 2019/05/20 15:24 by maries