As a new student is created on your application, you would have to declare a new student on our API as well. \\ {{ :api2:student:student.png?400 |Student}} ===Object resources=== ^ Property ^ Sub-property ^ Type ^ Description ^ | id || Integer | Identifier for the database of Domoscio's API | | uid || String | The ID of this student in your Database (must be unique) | | student_group_id || Integer | The group this student belongs to (for example a class or a session) | | active || Boolean | Student is enabled or not on API | | last_activity || DateTime | Last event made by that student | | created_at || DateTime | Date time of creation of the object | | updated_at || DateTime | Date time of the last update of the object | | civil_profile_attributes || | | | | student_infos | jsonb | Custom data that can be used to do clustering | | learning_profile_attributes || | | | | capacity | Float | Average memory compared to others (1 being the mean) | ===Create (POST)=== ^ Method | POST | ^ URL | /students | ==Parameters (*Requiered parameters)== ^ Property ^ Sub-property ^ Type ^ Description ^ | uid* || String | The ID of this student in your Database (must be unique) | | student_group_id || Integer | The group this student belongs to | | active || Boolean | Student is enabled or not on API | | civil_profile_attributes || | | | | student_infos | jsonb | Custom data that can be used to do clustering | ==Send the request (JSON input example)== { "student_group_id": 1, "uid": "S26", "civil_profile_attributes": { "student_infos": {"last_formation": "A74D"} } } ==Get the response (JSON output example)== { "id": 379, "student_group_id": 1, "created_at": "2017-11-24T13:44:08.034Z", "updated_at": "2017-11-24T13:44:08.034Z", "uid": "S26", "active": true, "last_activity": null, "learning_profile": { "capacity": 1 }, "civil_profile": { "student_infos": { "formation": "A7D4" } } } ===Fetch (GET)=== ^ Method | GET| ^ URL | /students/{student_id} | If you do not provide a student_id, you will fetch all the students of your platform. You can choose to filter the response by providing an uid in the parameters. ==Get the response (JSON output example)== **With ID provided**\\ { "id": 379, "created_at": "2017-11-24T13:44:08.034Z", "updated_at": "2017-11-24T13:44:08.034Z", "instance_id": 45, "uid": "26", "active": true, "student_group_id": 1, "last_activity": null, "civil_profile": { "student_infos": { "formation": "A7D4" } }, "learning_profile": { "capacity": 1 } } **Without ID provided**\\ [ { "id": 378, "student_group_id": 1, "created_at": "2017-11-24T13:42:24.402Z", "updated_at": "2017-11-24T13:42:24.402Z", "instance_id": 45, "uid": "25", "active": true, "last_activity": null, "learning_profile": { "capacity": 1 }, "civil_profile": { "student_infos": { "formation": "A7D4" } } }, { "id": 379, "student_group_id": 1, "created_at": "2017-11-24T13:44:08.034Z", "updated_at": "2017-11-24T13:44:08.034Z", "instance_id": 45, "uid": "26", "active": true, "last_activity": null, "learning_profile": { "capacity": 1 }, "civil_profile": { "student_infos": { "formation": "A7D4" } } } ] ===EDIT (PUT)=== ^ Method | PUT | ^ URL | /students/{student_id} | ==Editable parameters== ^ Property ^ Sub-property ^ Type ^ Description/expected values | | student_group_id || Integer | The group this student belongs to | | active || Boolean | Student is enabled or not on API | | civil_profile_attributes || | | | | student_infos | jsonb | Custom data that can be used to do clustering | ==Send the request (JSON input example)== { "student_group_id": 2, "civil_profile_attributes": { "student_infos": { "formation2": "Z5J8"} } } ==Get the response (JSON output example)== { "id": 379, "student_group_id": 2, "created_at": "2017-11-24T13:44:08.034Z", "updated_at": "2017-11-24T14:03:29.670Z", "uid": "26", "active": true, "last_activity": null, "learning_profile": { "capacity": 1 }, "civil_profile": { "student_infos": { "formation2": "Z5J8" } } }