Material Metadata
Returns watch progress for up to 10 video materials at once for the signed-in learner in one batch. Use it to show progress bars on a list of videos without fetching each material.
GET
/student/materials/metadataMaterial Metadata
curl --request GET \
--url 'https://<your-api-host>/nuSource/api/v1/student/materials/metadata?class_id=622297&material_ids[]=2365302&material_ids[]=2365300' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>'{
"code": 200,
"message": "Teaching material metadata retrieved successfully",
"materials": [
{
"material_id": 2365300,
"material_name": "Normal Video",
"seconds_played": 8,
"duration_seconds": 133
},
{
"material_id": 2365302,
"material_name": "DRM Video",
"seconds_played": 233,
"duration_seconds": 49
}
]
}Access: Learners only.
Query parameters
Batch (class) ID. The learner must have access to it.
Material IDs, repeated as
material_ids[]=1&material_ids[]=2. At most 10.Response
codeinteger
Example:
200messagestring
Example:
Teaching material metadata retrieved successfullymaterialsobject[]
Show child attributesHide child attributes
materials.material_idinteger
Example:
2365300materials.material_namestring
Example:
Normal Videomaterials.duration_secondsinteger
Example:
133Notes: Only Vimeo-hosted videos that are published in that batch are returned; other IDs are left out, and you may get an empty array. Errors: "class_id is required", "material_ids is required", "material_ids limit exceeded (max 10)", "You do not have access to this class". Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.