Create Text/HTML Teaching Material
Adds a text or HTML page as a teaching material in a curriculum section. Send the HTML in `html_text`, or upload an HTML file instead.
/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":"Text Html Material","description":"<p>Text Html Description And Instructions</p>","material_source":"html_text","external_url":"","html_text":"<p>Hello this is Content For Text HTML </p>","max_views":-1,"external_video_play":0,"is_prerequisite":0,"platform_type":"1","is_drm":0,"is_enterprise_drm":0,"language_id":null,"is_videocrypt_drm":0,"is_scorm":0,"isscorm_withanalytics":0,"vdocipher_video_id_for_direct_upload":null}'{
"code": 200,
"message": "Teaching material created successfully",
"material": {
"material_id": 17493,
"file_name": null,
"description": "<p>Text Html Description And Instructions</p>",
"material_name": "Text Html Material",
"material_source": "html_text",
"type": null,
"external_url": null,
"section_id": 6174,
"is_drm": 0,
"is_downloadable": null,
"is_watermarked": null,
"watermark_text": null,
"is_enterprise_drm": 0,
"display_index": 17493,
"resource_type": 4
}
}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. To upload an HTML file instead of html_text, add it as a file field named uploaded_file.
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.html_text.Set material_source to html_text for this request.
200Teaching material created successfullyShow child attributesHide child attributes
<p>Text Html Description And Instructions</p>Text Html Materialhtml_text617400Notes: Sending both html_text and a file fails with "Please Provide HTML content or upload HTML file, not both". 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.