Docs home

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.

POST/tutor/materials
Create Normal Video Teaching Material
curl --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:

BodyJSONString
section_idintegerrequired
Curriculum section to add the material to. Must be in your institute, otherwise "Invalid Section ID".
material_namestringrequired
Name shown to learners. Letters, digits, spaces and common punctuation.
material_sourcestringrequired
Kind of material: file (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).
descriptionstring (HTML)
Description or instructions shown with the material. External images in it are copied into Edmingle.
1 makes learners finish this material before they can open later items. Default 0.
Purpose unclear from code; it is stored with the material. The web app sends 1.
material_arrayarrayrequired
One object describing the video file (fields below).
typestring
MIME type of the video, for example video/mp4.
true lets learners download the video. Forced to false when any DRM option is on.
max_viewsinteger
How many times each learner may open it. -1 (default) means unlimited.
is_drmboolean
Use Edmingle DRM video hosting instead of Vimeo. DRM must be enabled in your advanced settings.
Use Enterprise DRM hosting. Must be enabled for your institute; counts against its storage limit.
Use Secure DRM hosting. Must be enabled for your institute.
Use Gumlet hosting (without or with DRM). Ignored unless enabled for your institute.

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.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Teaching material created successfully
materialobject
Show child attributesHide child attributes
Use it in later calls
Example: 17491
Example: <p>Vimeo+Video+upload</p>
Example: Vimeo+Video+Upload
Example: file
Example: 6174
Example: false
Example: true
Example: false
Position in the section
Example: 17491
Always 4, teaching material
Example: 4
Example: 549

Notes: 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.

Updated yesterday

Ask AI