Skip to main content

Videos

The Video API allows authenticated users to access and read all available videos.

Get All Watched Videos​

This endpoint retrieves all watched videos for the authenticated user.

HTTP Request​

GET /api/v2.5/me/videos_watched/

Query Parameters​

ParameterTypeDescription
start_datestringstart date in the format yyyy-mm-dd
end_datestringend date in the format yyyy-mm-dd
coursestringunique coure id
chapterstringunique chapter id

Example:​

/api/v2.5/me/videos_watched/?start_date=2023-12-29&end_date=2024-05-29&course=14

This endpoint will get the list of videos watched from the course with ID 14 from December 29, 2023, to May 29, 2024.

curl --request GET \
--url http://demo.testpress.in/api/v2.5/me/videos_watched/
--header 'authorization: JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3RwcmVzcyIsInVzZXJfaWQiOjE3LCJlbWFpbCI6InRlc3RwcmVzcy5pbkBnbWFpbC5jb20iLCJleHAiOjE0NDc4MzMyMjl9.Ik_yi4lHbNbrRGhqmRpsW82Nls_O9lgXakk_syV-vSw' \
--header 'cache-control: no-cache'

Response​

{
"count": 2,
"next": null,
"previous": null,
"per_page": 20,
"results": [
{
"id": 3647,
"title": "Testing Chat",
"watched_duration": null,
"total_duration": "25 seconds",
"created": "2024-04-29T23:57:06.339798+05:30",
"watched_percentage": 0,
"remaining_duration": "25 seconds",
"course_title": "Sample Course",
"chapter_name": "ZLS Demo",
"content_created_date": "2024-04-24T18:28:35+05:30"
},
{
"id": 3646,
"title": "Testing1",
"watched_duration": null,
"total_duration": "41 seconds",
"created": "2024-04-29T23:56:59.034408+05:30",
"watched_percentage": 0,
"remaining_duration": "41 seconds",
"course_title": "Sample Course",
"chapter_name": "sample",
"content_created_date": "2024-04-24T15:07:52+05:30"
}
]
}