====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
api2:student:student_cluster_membership [2017/10/13 17:28] maries |
api2:student:student_cluster_membership [2017/11/24 18:31] (current) maries |
||
---|---|---|---|
Line 3: | Line 3: | ||
===Object resources=== | ===Object resources=== | ||
^ Property ^ Type ^ Description ^ | ^ Property ^ Type ^ Description ^ | ||
+ | | id | Integer | identifier for the database of Domoscio's API | | ||
| student_id | Integer | The related student | | | student_id | Integer | The related student | | ||
| student_cluster_id | Integer | The related cluster | | | student_cluster_id | Integer | The related cluster | | ||
| matching | Float | Float between 0 and 1 which indicates the proximity between the related Student and the Student who “owns” the Cluster | | | matching | Float | Float between 0 and 1 which indicates the proximity between the related Student and the Student who “owns” the Cluster | | ||
+ | | created_at | DateTime | Date of creation of the object | | ||
+ | | updated_at | DateTime | Last time the object has been modified | | ||
+ | |||
===Fetch (GET)=== | ===Fetch (GET)=== | ||
Line 11: | Line 15: | ||
^ Method | GET| | ^ Method | GET| | ||
^ URL | /student_cluster_memberships/{student_cluster_memberships_id} | | ^ URL | /student_cluster_memberships/{student_cluster_memberships_id} | | ||
+ | |||
+ | If no student_cluster_membership_id is provided, it will fetch all Student Cluster Membership of your instance. You can choose to filter by adding the parameters student_cluster_id or student_id. | ||
==Get the response (JSON output example)== | ==Get the response (JSON output example)== | ||
- | **With ID provided**\\ | + | **With Id provided**\\ |
- | + | ||
- | <code> | + | |
- | + | ||
- | </code> | + | |
- | + | ||
- | + | ||
- | **Without ID provided**\\ | + | |
- | <code> | + | |
- | + | ||
- | </code> | + | |
- | + | ||
- | + | ||
- | ===Fetch by Student Cluster (GET)=== | + | |
- | + | ||
- | ^ Method | PUT | | + | |
- | ^ URL | /student_clusters /{student_cluster _id}/student_cluster_memberships | | + | |
- | + | ||
- | ==Send the request (JSON input example)== | + | |
<code> | <code> | ||
{ | { | ||
- | name : « No more Corporate Finance » | + | "id": 951, |
+ | "student_id": 375, | ||
+ | "matching": 0.8, | ||
+ | "student_cluster_id": 385, | ||
+ | "created_at": "2017-11-24T17:22:02.570Z", | ||
+ | "updated_at": "2017-11-24T17:22:02.570Z" | ||
} | } | ||
</code> | </code> | ||
- | ==Get the response (JSON output example)== | + | **Without Id provided**\\ |
<code> | <code> | ||
- | { | + | [ |
- | id: 1, | + | { |
- | name: « No more Corporate Finance », | + | "id": 951, |
- | instance_id: 1 | + | "student_id": 375, |
- | } | + | "matching": 0.8, |
+ | "student_cluster_id": 385, | ||
+ | "created_at": "2017-11-24T17:22:02.570Z", | ||
+ | "updated_at": "2017-11-24T17:22:02.570Z" | ||
+ | }, | ||
+ | { | ||
+ | "id": 952, | ||
+ | "student_id": 378, | ||
+ | "matching": 0.9, | ||
+ | "student_cluster_id": 385, | ||
+ | "created_at": "2017-11-24T17:22:10.367Z", | ||
+ | "updated_at": "2017-11-24T17:22:10.367Z" | ||
+ | } | ||
+ | ] | ||
</code> | </code> | ||
- | |||
- |