As a new student is created on your application, you would have to declare a new student on our API as well.
Object resources
Property | Sub-property | Type | Description |
instance_id | Integer | The instance the student belongs to |
uid | String | The ID of this student in your Database (must be unique) |
student_group_id | Integer | The group this student belongs to |
last_activty | Timestamp | Date of the last event record for that student |
active | Boolean | Student is enabled or not on API |
civil_profile_attributes | | |
| name | String | Custom data |
| sexe | String | Amongst (‘male’, ’female’, ‘undefined’) |
| date_of_birth | Timestamp | The date of birth of the student |
| place_of_birth | String | The place of birth of the student |
| country_of_residence | String | The country of residence of the student |
| city_of_residence | String | The city of residence of the student |
learning_profile_attributes | | |
| forgetting_parameters | String | |
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 |
civil_profile_attributes | | |
| name* | String | Custom data |
| sexe | String | Amongst (‘male’, ’female’, ‘undefined’) |
| date_of_birth | Timestamp | The date of birth of the student |
| place_of_birth | String | The place of birth of the student |
| country_of_residence | String | The country of residence of the student |
| city_of_residence | String | The city of residence of the student |
learning_profile_attributes | | |
| forgetting_parameters | String | |
As a convenience we let you declare in the same time a student, his/her civil profile and his/her learning profile:
{
student_group_id: 1,
civil_profile_attributes: {
name: "Student1",
sexe: "male",
day_of_birth: Date.today,
place_of_birth: "FR",
country_of_residence: "FR",
city_of_residence: "Paris"
},
learning_profile_attributes: {
forgetting_parmeters: "[1,2,3,4]"
}
}
Get the response (JSON output example)
{
"id": 29,
"student_group_id": 1,
"created_at": "2017-03-01T10:06:24.371Z",
"updated_at": "2017-03-01T10:06:24.371Z",
"instance_id": 3,
"uid": null,
"active": true,
"last_activity": "2017-03-01T10:10:43.301Z",
"civil_profile": {
"date_of_birth": "2017-03-01T10:06:24.371Z",
"place_of_birth": "FR",
"name": "Student1",
"sexe": "male",
"country_of_residence": "FR",
"city_of_residence": "Paris",
},
learning_profile_attributes: {
forgetting_parmeters: "[1,2,3,4]"
}
}
Fetch (GET)
Method | GET |
URL | /students/{student_id || uid} |
Get the response (JSON output example)
{
id : 2,
student_group_id: 1,
name: "Student1",
sexe: "male",
day_of_birth: 1986-09-17 09:21:03,
place_of_birth: "FR",
country_of_residence: "FR",
city_of_residence: "Paris",
forgetting_parmeters: "[1,2,3,4]",
instance_id : 1,
created_at : 2014-09-17 09:21:03,
updated_at : 2014-09-17 09:21:03
}
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 |
civil_profile_attributes | | |
| name | String | Custom data |
| sexe | String | Amongst (‘male’, ’female’, ‘undefined’) |
| date_of_birth | Timestamp | The date of birth of the student |
| place_of_birth | String | The place of birth of the student |
| country_of_residence | String | The country of residence of the student |
| city_of_residence | String | The city of residence of the student |
learning_profile_attributes | | |
| forgetting_parameters | String | |
{
student_group_id: 1,
civil_profile_attributes: {
name: "Student with new name",
city_of_residence: "Lyon"
}
}
Get the response (JSON output example)
{
"id": 29,
"student_group_id": 1,
"created_at": "2017-03-01T10:06:24.371Z",
"updated_at": "2017-03-01T10:06:24.371Z",
"instance_id": 3,
"uid": null,
"active": true,
"last_activity": "2017-03-01T10:10:43.301Z",
"civil_profile": {
"date_of_birth": "2017-03-01T10:06:24.371Z",
"place_of_birth": "FR",
"name": "Student with new name",
"sexe": "male",
"country_of_residence": "FR",
"city_of_residence": "Lyon",
},
learning_profile_attributes: {
forgetting_parmeters: "[1,2,3,4]"
}
}