List Lessons
Retrieve a paginated list of lessons on a course, lowest order first. Headings (type header) and hidden lessons are included. The list is the unpublished curriculum, or the live curriculum when nothing is unpublished, and it has no preview_url. See Lessons.
Request
GET /players/{id}/files
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Course UUID. See Identifiers. |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number. A missing, non-numeric, zero, or negative value is treated as 1 and does not return an error. A page past the end returns an empty data array and 200. |
per_page | integer | 25 | Items per page (min: 1, max: 100). Anything else is 422. |
Example Request
curl -X GET "https://app.easy.tools/api/v1/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/files?page=1&per_page=25" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Response
Success Response (200)
{
"data": [
{
"id": "3a91c4e0-6b27-4f58-9d14-7e2b8c0a5f63",
"name": "Welcome",
"type": "video",
"description": "Start here.",
"text": "",
"src_url": "https://video.example.com/play/welcome",
"video_source": "bunny",
"info": "",
"is_free": true,
"is_hidden": false,
"order": 0,
"schedule": null
},
{
"id": "7c4e2b18-9a30-4d61-b845-1f6d0e8a3c29",
"name": "Week 1",
"type": "header",
"description": null,
"text": "",
"src_url": "",
"video_source": "vimeo",
"info": "",
"is_free": false,
"is_hidden": false,
"order": 1,
"schedule": null
}
],
"pagination": {
"current_page": 1,
"total_pages": 1,
"per_page": 25,
"total": 2
}
}
Response Fields
Each entry in data has the fields described in Lesson Object.
include=files on Get Course returns this same ordered curriculum in one array, without pagination.
Pagination Object
See Pagination Object. total is the number of lessons on the course.
Error Responses
Not Found Error (404)
See Identifiers.
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found"
}
}
Validation Error (422 Unprocessable Entity)
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"per_page": ["per_page must not be greater than 100"]
}
}
}
Authentication, permission, and rate-limit errors are described in Authorization.