Get Batch Class Section Resource Details (Material)
Returns one teaching material as a learner sees it inside a batch, with the link or player details needed to open it. Use it in a learner-facing app when the learner opens a material.
/student/materials/{ResourceId}curl --request GET \
--url 'https://<your-api-host>/nuSource/api/v1/student/materials/{ResourceId}?class_id=<ClassId>'{
"code": 200,
"message": "Teaching material retrieved successfully",
"material": {
"material_id": 12089,
"description": "<p><br></p>",
"file_name": "",
"material_name": "asdfasdfasdf",
"type": "",
"external_url": null,
"is_downloadable": 0,
"is_watermarked": 0,
"is_drm": 0,
"watermark_text": null,
"max_views": -1,
"seconds_played": "0",
"user_views": null,
"external_video_play": 0,
"ispring_cloud_link": null,
"vimeo_url": 0,
"vimeo_transcoding_status": 1,
"drm_url": "",
"drm_transcoding_status": 0,
"html_text": "<p>adffadsfasd</p>",
"material_source": "html_text",
"availability": "1",
"activate_at": 0,
"deactivate_at": 0,
"drm_library_id": 0,
"url": ""
},
"notes": []
}Access: Learners enrolled in the batch, plus parents, institute admins, tutors and custom roles that can view curriculum. Learners are checked against their own access to the material.
200Teaching material retrieved successfullyShow child attributesHide child attributes
12089<p><br></p>asdfasdfasdf000-100010<p>adffadsfasd</p>html_text100Notes: Opening a material here also records it as the learner's last viewed item. Errors: "Invalid Material ID !", "Content is not available for this class." (not published in that batch), prerequisite or drip-schedule errors, "Watch limit is completed." (time-restricted videos), and "DRM is not supported on this Browser..." for Secure DRM on unsupported browsers. Numbers such as seconds_played and availability can come back as strings. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.