Advisor Students (deprecated)¶
Manage the mapping of advisors to students.
Warning
Advisors have been retired as of August 2022. Please use Dashboards.
- Linked From:
PUT or PATCH¶
The PUT
method is used to upload a file of mappings
that should replace all of the mappings that already exist.
The PATCH
method is used to upload a file of mappings
that should augment the mappings that already exist.
A 200 response is returned if the upload was successfully processed. The mappings will be saved even if there are students missing. The response will contain details outlining any missing students.
- Accepted Request Content-Types:
text/csv
,application/json
Note: Be sure to include the encoding using the
charset
content type parameter, so that we can properly interpret your upload. We highly recommend usingutf-8
if possible.- Available Response Content-Types:
application/json
Example Request¶
- URL:
/detective/api/advisor/student/
- Content-Type:
text/csv
advisor_id,advisor_sis_id,student_id,student_sis_id
1,,2,
,3,,4
5,,,6
,7,8,
- URL:
/detective/api/advisor/student/
- Content-Type:
application/json
[
{"advisor_id": "1", "student_id": "2"},
{"advisor_sis_id": "3", "student_sis_id": "4"},
{"advisor_id": "5", "student_sis_id": "6"},
{"advisor_sis_id": "7", "student_id": "8"}
]
Example Success Response¶
- URL:
/detective/api/advisor/student/
- Status:
200 OK Request
- Content-Type:
application/json
{
"detail": "Some advisors or students could not be found.",
"missing": {
"advisor_id": ["1", "5"],
"advisor_sis_id": ["3", "7"],
"student_id": ["2", "8"],
"student_sis_id": ["4", "6"]
}
}
Example Error Response¶
- Status:
422 Unprocessable Entity
- Content-Type:
application/json
{
"detail": "No advisor mappings were given."
}