Dashboard Viewers¶
Manage the mapping of dashboards to viewers.
- Linked From:
Hint
If you’re looking to fetch viewers of a dashboard, try our v2 API, Dashboard Viewers
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.
Warning
Please be aware that using the PUT method may conflict
with dashboard changes made through the Dropout Detective/Grade Guardian web application.
It is recommended to communicate with the designated access managers of Dropout Detective
so they know which dashboards can be edited through the web interface and which will
be managed through the API integration.
A 200 response is returned if the upload was successfully processed. The mappings will be saved even if there are viewers missing. The response will contain details outlining any missing viewers.
- Accepted Request Content-Types:
text/csv,application/jsonNote: Be sure to include the encoding using the
charsetcontent type parameter, so that we can properly interpret your upload. We highly recommend usingutf-8if possible.- Available Response Content-Types:
application/json
Example Request¶
- URL:
/detective/api/dashboard/viewer/- Content-Type:
text/csv
dashboard_name,viewer_id,viewer_sis_id,viewer_is_ally
Football,2,,
Football,,4,True
Football,,6,False
Badminton,8,,True
- URL:
/detective/api/dashboard/viewer/- Content-Type:
application/json
[
{"dashboard_name": "Football", "viewer_id": "2"},
{"dashboard_name": "Football", "viewer_sis_id": "4", "viewer_is_ally": true},
{"dashboard_name": "Football", "viewer_sis_id": "6", "viewer_is_ally": false},
{"dashboard_name": "Badminton", "viewer_id": "8", "viewer_is_ally": true}
]
Example Success Response¶
- URL:
/detective/api/dashboard/viewer/- Status:
200 OK Request
- Content-Type:
application/json
{
"detail": "Some viewers could not be found.",
"missing": {
"viewer_id": ["2", "8"],
"viewer_sis_id": ["4", "6"]
}
}
Example Error Response¶
- Status:
422 Unprocessable Entity
- Content-Type:
application/json
{
"detail": "No dashboard mappings were given."
}