====== Differences ====== This shows you the differences between two versions of the page.
|
api1:knowledge_structure:knowledge_node_student [2017/10/07 14:57] 127.0.0.1 external edit |
api1:knowledge_structure:knowledge_node_student [2017/10/17 10:30] (current) maries |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | Once the content’s structure is declared on our API, logical links between Students and Knowledge Nodes are created. We could call that « subscriptions ». But it goes further than that since this link is also the container of all the results, data computations and analysis for the student. A Student is related to all the Knowledge Nodes.\\ | ||
| + | |||
| + | {{ :api1:knowledge_structure:knowledge_node_students_v1.png?600 | Knowledge Node Student schema}} | ||
| + | |||
| + | ===Object resources=== | ||
| + | ^ Property ^ Type ^ Description ^ | ||
| + | | instance_id | Integer | The instance the knowledge node student belongs to | | ||
| + | | knowledge_node_id | Integer | The knowledge node the knowledge node student belongs to | | ||
| + | | student_id | Integer | The student the knowledge node student belongs to | | ||
| + | | active | Boolean | It becomes false when the reviewing has been done to the end | | ||
| + | | history | String | Sequence of binary results for the student on the knowledge node | | ||
| + | | next_review_at | Timestamp | The next revision date computed by the engine | | ||
| + | | knowledge_node_uid | String | The related knowledge node unique id | | ||
| + | |||
| + | ===Create (POST)=== | ||
| + | |||
| + | ^ Method | POST | | ||
| + | ^ URL | /knowledge_node_students | | ||
| + | |||
| + | ==Parameters (*Required parameters)== | ||
| + | |||
| + | ^ Property ^ Type ^ Description ^ | ||
| + | | knowledge_node_id* | Integer | The knowledge node the knowledge node student belongs to | | ||
| + | | student_id* | Integer | The student the knowledge node student belongs to | | ||
| + | |||
| + | ==Send the request (JSON input example)== | ||
| + | |||
| + | <code> | ||
| + | { | ||
| + | knowledge_node_id : 1, | ||
| + | student_id: 1 | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | |||
| + | ==Get the response (JSON output example)== | ||
| + | |||
| + | <code> | ||
| + | { | ||
| + | id : 1, | ||
| + | knowledge_node_id : 1, | ||
| + | student_id : 1, | ||
| + | instance_id : 1, | ||
| + | state : 0, | ||
| + | history : ‘’, | ||
| + | next_review_at : null, | ||
| + | current_review_interv : 0, | ||
| + | created_at : 2014-09-17 09:21:03, | ||
| + | updated_at : 2014-09-17 09:21:03 | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | ===Fetch (GET)=== | ||
| + | |||
| + | ^ Method | GET | | ||
| + | ^ URL | /knowledge_node_students/{knowledge_node_student_id %%||%% uid} | | ||
| + | |||
| + | If no knowledge_node_student_id or uid is provided it will fetch all the Knowledge Node Students for your instance. | ||
| + | |||
| + | ==Get the response (JSON output example)== | ||
| + | |||
| + | **With ID provided**\\ | ||
| + | |||
| + | <code> | ||
| + | { | ||
| + | id : 1, | ||
| + | knowledge_node_id : 1, | ||
| + | student_id : 1, | ||
| + | history : ‘’, | ||
| + | next_review_at : null, | ||
| + | active : true, | ||
| + | created_at : 2014-09-17 09:21:03, | ||
| + | updated_at : 2014-09-17 09:21:03 | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | |||
| + | **Without ID provided**\\ | ||
| + | <code> | ||
| + | [ | ||
| + | { | ||
| + | id : 1, | ||
| + | knowledge_node_id : 1, | ||
| + | student_id : 1, | ||
| + | next_review_at : null, | ||
| + | active: true, | ||
| + | created_at : 2014-09-17 09:21:03, | ||
| + | updated_at : 2014-09-17 09:21:03 | ||
| + | }, | ||
| + | { | ||
| + | id : 2, | ||
| + | knowledge_node_id : 2, | ||
| + | student_id : 1, | ||
| + | next_review_at : null, | ||
| + | active: true, | ||
| + | created_at : 2014-09-17 09:21:13, | ||
| + | updated_at : 2014-09-17 09:21:13 | ||
| + | } | ||
| + | ] | ||
| + | </code> | ||
| + | |||
| + | ===Fetch Knowledge Node Students by Student (GET)=== | ||
| + | |||
| + | You can get all Student’s Knowledge Nodes by a simple request: | ||
| + | |||
| + | ^ Method | GET | | ||
| + | ^ URL | /students/{student_id}/knowledge_node_students/ | | ||