====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
api2:data:objective_student_assessments [2018/07/31 11:29] maries |
api2:data:objective_student_assessments [2019/07/03 10:39] (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 Objective Student Assessment in your Database | | ||
| objective_student_id | Integer | The ID of the objective_student it is related to | | | objective_student_id | Integer | The ID of the objective_student it is related to | | ||
| mark | Integer | It expects an integer between 0 and 100. 0 means nothing is correct, 100 means perfect | | | mark | Integer | It expects an integer between 0 and 100. 0 means nothing is correct, 100 means perfect | | ||
Line 10: | Line 11: | ||
| start_date | DateTime | when the interaction between the student and the objective started | | | start_date | DateTime | when the interaction between the student and the objective started | | ||
| end_date | DateTime | when the interaction between the student and the objective ended | | | end_date | DateTime | when the interaction between the student and the objective ended | | ||
+ | | created_at | DateTime | Date of creation of the object | | ||
+ | | updated_at | DateTime | Last time the object has been modified | | ||
===Create (POST)=== | ===Create (POST)=== | ||
Line 23: | Line 26: | ||
| knowledge_node_update | Boolean | If true, this object should be use to update the user model (it is false by default) | | | knowledge_node_update | Boolean | If true, this object should be use to update the user model (it is false by default) | | ||
| success_threshold | Integer | This parameter use the same scale as "mark". If mark is above threshold, then the interaction can be seen as positive, otherwise it can be seen as negative | | | success_threshold | Integer | This parameter use the same scale as "mark". If mark is above threshold, then the interaction can be seen as positive, otherwise it can be seen as negative | | ||
- | | start_date | DateTime | when the interaction between the student and the objective started | | + | | start_date* | DateTime | when the interaction between the student and the objective started | |
| end_date | DateTime | when the interaction between the student and the objective ended | | | end_date | DateTime | when the interaction between the student and the objective ended | | ||
| payload | Json | You can use this field to add other information such as the geographic position | | | payload | Json | You can use this field to add other information such as the geographic position | | ||
- | | created_at | DateTime | Date of creation of the object | | ||
- | | updated_at | DateTime | Last time the object has been modified | | ||
==Send the request (JSON input example)== | ==Send the request (JSON input example)== | ||
Line 64: | Line 65: | ||
If no objective_student_assessment_id is provided it will fetch all the ObjectiveStudentAssessment of your instance. | If no objective_student_assessment_id is provided it will fetch all the ObjectiveStudentAssessment of your instance. | ||
+ | In the parameters of your request, you can add a specific objective_id ou student_id to see only the ObjectiveStudentAssessment related to them. | ||
==Get the response (JSON output example)== | ==Get the response (JSON output example)== | ||
Line 102: | Line 104: | ||
] | ] | ||
</code> | </code> | ||
+ | |||
+ | ===Create in batches (POST)=== | ||
+ | |||
+ | ^ Method | POST | | ||
+ | ^ URL | /objective_student_assessments/batch_creation | | ||
+ | |||
+ | This route allows to send objective student assessment in batches to speed up their creation. Besides the constraints of a unique objective student assessment that are kept, there are two others: it is not possible to create more than 250 objective student assessment in one batch, and in one batch all the objective student assessment must be related to only one student. | ||
+ | |||
+ | ==Parameters (*Requiered parameters)== | ||
+ | |||
+ | ^ Property ^ Type ^ Description ^ | ||
+ | | student_id (or student_uid)* | Integer (String) | The ID (or UID) of the student the objective_student_assessments are related to | | ||
+ | | knowledge_node_update | Boolean | If true, this object should be use to update the user model (it is false by default) | | ||
+ | | array_of_osa | Array | Each element of the array contains information about an ObjectiveStudentAssessment : mark (integer)*, objective_student_id or objective_id or objective_uid*, success_threshold, start_date*, end_date, payload | | ||
+ | |||
+ | ==Send the request (JSON input example)== | ||
+ | |||
+ | <code> | ||
+ | { | ||
+ | "student_id": 5, | ||
+ | "knowledge_node_update": true, | ||
+ | "array_of_osa": [{ | ||
+ | "objective_id": 3, | ||
+ | "uid": "alpha1", | ||
+ | "mark": 97, | ||
+ | "start_date": "2019-02-27T16:27:53.891Z", | ||
+ | "end_date": "2019-02-27T17:27:53.891Z" | ||
+ | }, | ||
+ | { | ||
+ | "objective_student_id": 11, | ||
+ | "mark": 96, | ||
+ | "start_date": "2019-02-27T16:27:53.891Z", | ||
+ | "end_date": "2019-02-27T17:27:53.891Z" | ||
+ | }] | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ==Get the response (JSON output example)== | ||
+ | |||
+ | <code> | ||
+ | { | ||
+ | "failed_instances": [], | ||
+ | "created_osa_ids": [ | ||
+ | 23, | ||
+ | 24 | ||
+ | ] | ||
+ | } | ||
+ | </code> | ||
+ |