Docs home

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/metadata
Material 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
class_idintegerrequired
Batch (class) ID. The learner must have access to it.
material_ids[]array of integersrequired
Material IDs, repeated as material_ids[]=1&material_ids[]=2. At most 10.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Teaching material metadata retrieved successfully
materialsobject[]
Show child attributesHide child attributes
Example: 2365300
Example: Normal Video
Total seconds this learner watched in the batch
Example: 8
Example: 133

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

Updated yesterday

Ask AI