Create Normal Video Teaching Material
Starts adding a video as a teaching material. The call creates the material and returns an upload link; you then upload the video file yourself and finish with "Complete Normal Video Upload". Use this for videos instead of sending the file in this request.
/tutor/materialscurl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/tutor/materials' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"section_id":6174,"material_name":"Vimeo+Video+Upload","material_source":"file","is_downloadable":true,"external_url":"","description":"<p>Vimeo+Video+upload</p>","type":"video/mp4","file_name":null,"max_views":-1,"external_video_play":0,"is_prerequisite":0,"platform_type":"1","material_array":[{"size":1055736,"original_name":"big_buck_bunny_720p_1mb+(1).mp4","type":"video/mp4","number":2,"file":{}}],"is_drm":false,"is_enterprise_drm":false,"is_videocrypt_drm":false}'{
"code": 200,
"message": "Teaching material created successfully",
"material": {
"material_id": 17491,
"file_name": "",
"description": "<p>Vimeo+Video+upload</p>",
"material_name": "Vimeo+Video+Upload",
"material_source": "file",
"type": "",
"external_url": null,
"section_id": 6174,
"is_drm": false,
"is_downloadable": true,
"is_watermarked": null,
"watermark_text": null,
"is_enterprise_drm": false,
"display_index": 17491,
"resource_type": 4
},
"upload_link": "https://asia-files.tus.vimeo.com/files/vimeo-prod-tus-regional-asia-east1/6f6e9a1e7f8585fbe187a769fe61b603",
"temp_vimeo_id": 549
}Access: Institute admins and tutors of the course the section belongs to. Custom roles need the manage-curriculum permission and must also be an admin or a tutor of that course.
Request body: form-data with one field, JSONString, containing this JSON:
JSONStringfile (uploaded file or video), external_url (link), html_text (text/HTML page), feedback_form, lti (external LTI tool) or vimeo (existing Vimeo video by ID).1 makes learners finish this material before they can open later items. Default 0.1.video/mp4.true lets learners download the video. Forced to false when any DRM option is on.-1 (default) means unlimited.Set material_source to file for this request.
Fields in each material_array object:
| Name | Required | Type | Description |
|---|---|---|---|
| size | Yes | integer | File size in bytes. Must be greater than 0. |
| original_name | Yes | string | Original file name. |
200Teaching material created successfullyShow child attributesHide child attributes
<p>Vimeo+Video+upload</p>Vimeo+Video+Uploadfile6174falsetruefalse549Notes: Upload the file to upload_link with the tus protocol, then call "Complete Normal Video Upload" with material_id and temp_vimeo_id. Until then the video is not playable. Fails with "Failed to create Vimeo upload. Please try again." if the hosting provider rejects the request. If the section is already published in a batch, enrolled learners get a "New Material Added" push notification. Errors: "Invalid Section ID" (section not found or not in your institute), and a tutor-only error if you are not an admin or tutor of the course. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.