Course Attachments API

PUT - /api/v1/courses/:course_id/attachments/:id

PUT /api/v1/courses/:course_id/attachments/:id

Parameters

Name Description
id id
kind what kind of attachment - text/file/quiz
file a filepicker file blob {url:, filename:, mimetype:, size:, key:,container:}
attachable_id the id of the object this should be attached to (Lecture/Course)
attachable_type type of the object (Lecture/Course)

Request

Headers

Accept: application/json
X-Api-Token: M67uU85PzpqRdJzZyZAgoRUVkV4fZsvStQ
X-Api-Email: user-27@example.com

Route

PUT /api/v1/courses/287/attachments/87

Body

{"kind":"video","attachable_id":287,"attachable_type":"Course"}

cURL

curl "http://localhost:3000/api/v1/courses/287/attachments/87" -d '{"kind":"video","attachable_id":287,"attachable_type":"Course"}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: M67uU85PzpqRdJzZyZAgoRUVkV4fZsvStQ" \
	-H "X-Api-Email: user-27@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Status

204 No Content