Here's some documentation explaining our user-accessible Feedback API. All of the API routes should be prefixed with the root URL of Top Hat's web server, app.tophat.com
.
This is not the complete API, but these methods should be all that you need to use the API in the way you require!
Feel free to shoot me an email directly if you have any questions: [email protected]
All requests to Top Hat's API should have the API-KEY
HTTP header set to your API key. You can determine your API key by logging into Top Hat and running window.ajax_headers['API-KEY']
inside a JavaScript console.
GETting this list resource will return a paginated list of Feedbacks that your user is authorized to see.
POSTing a new Feedback to this list route will create a new Feedback item.
body:
title: String
duration: Number
course: URI referencing a course in Top Hat
location
header contains the resource URI of the newly created Feedback.
Only users authorized to create content in the course provided will be allowed to POST new Feedbacks. This usually means professors who created the course that the Feedback is being created for.
GETting this detail resource will return all of the data for a specified Feedback.
Only teachers who own the course, or students enrolled in the course, can pull Feedback contained within the course.
body:
title: String
sms_key: String
duration: Number
course: URI
data: List
seconds_until_active: Number
Feedback response data can be pulled from the API by accessing the /api/v2/feedback_response/:id
route, and providing a Feedback ID for the :id
parameter in the URI. Use this to get specific details about user responses to Feedbacks. Each user has a timeout that prevents them from re-submitting, so this resource returns user-specific data.
No data, just HTTP response.
Users submit new Feedback responses by PUTting to the /api/v2/feedback_response/:id
resource, and providing a Feedback ID for the :id
parameter in the URI. Use this to submit responses to Feedback items.
No data, just HTTP response.