Docs home

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.

GET/student/materials/{ResourceId}
Get Batch Class Section Resource Details (Material)
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.

Path parameters
ResourceIdintegerrequired
Teaching material ID.
Query parameters
class_idinteger
Batch (class) ID. Send it so availability, drip schedule, prerequisites, view counts and watch time are worked out for that batch.
For multilingual materials: the language to return.
device_idinteger
Device ID, for Secure DRM video playback.
Device or browser name, for Secure DRM videos.
device_osstring
Operating system, for Secure DRM videos.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Teaching material retrieved successfully
materialobject
Show child attributesHide child attributes
Example: 12089
Example: <p><br></p>
Example: asdfasdfasdf
Example: 0
Example: 0
Example: 0
Example: -1
Example: 0
This learner's views
Example: 0
Example: <p>adffadsfasd</p>
Example: html_text
Example: 1
Example: 0
Unix timestamps, 0 if not scheduled
Example: 0
Example: 0
Signed file link, when there is a file
notesarray

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

Updated yesterday

Ask AI