Course Attachments API

for owner

GET /api/v1/courses/:course_id/attachments

Parameters

Name Description
id id

Request

Headers

Accept: application/json
X-Api-Token: 39S6aZdF8DyQSg17iS1s9E1knhm_4S-N7Q
X-Api-Email: user-21@example.com

Route

GET /api/v1/courses/285/attachments?id=85

Query Parameters

id: 85

cURL

curl "http://localhost:3000/api/v1/courses/285/attachments?id=85" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: 39S6aZdF8DyQSg17iS1s9E1knhm_4S-N7Q" \
	-H "X-Api-Email: user-21@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 713

Status

200 OK

Body

{
  "attachments": [
    {
      "created_at": "2019-10-31T22:07:32Z",
      "code_syntax": null,
      "content_type": "video/mp4",
      "audio_type": "video/mp4",
      "should_be_uploaded_to_wistia?": false,
      "data": null,
      "schema": null,
      "text_constructor": null,
      "full_url": "http://school.worksonmy.computer/courses/285",
      "url": "https://filepicker.teachablecdn.com/api/file/ecPcZorTYauJQ59p0cge",
      "host_id": "0j4jh5zobq",
      "source": "user",
      "kind": "video",
      "name": "small.mp4",
      "host": "wistia",
      "position": null,
      "attachable_id": 285,
      "is_published": true,
      "downloadable": false,
      "text": null,
      "attachable_type": "Course",
      "thumbnail_url": null,
      "meta": {
        "class": "attachment",
        "url": null,
        "name": "small.mp4",
        "description": "",
        "image_url": null
      },
      "embeddable": true,
      "id": 85,
      "plain_text_html": ""
    }
  ]
}