List Classes
Endpoint used to list essential information about classes within educational institutions in Toolzz LMS.
Warning: This endpoint will only work correctly if the domain of your institution is manually provided in the URL. Otherwise, the endpoint may fail or return a validation error.
Request Example
Section titled “Request Example”curl --request GET \ --url 'https://{your-institution-domain}/api/v1/schools/{schoolId}/classrooms?page=1&perPage=20' \ --header 'Authorization: Bearer <token>'Response Example
Section titled “Response Example”{ "success": true, "data": [ { "id": 1, "schoolId": 1, "title": "<string>", "code": "<string>", "image": "<string>", "course": "<string>", "group": [{ "id": 1, "name": "<string>" }], "subgroups": [{ "id": 1, "name": "<string>" }], "specialties": [{ "id": 1, "name": "<string>" }], "trails": [], "createdAt": "<string>", "updatedAt": "<string>" } ], "meta": { "total": 100, "per_page": 20, "current_page": 1, "last_page": 5, "first_page_url": "<string>", "last_page_url": "<string>", "next_page_url": "<string>", "prev_page_url": null, "from": 1, "to": 20 }}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
URL Parameters (Path)
Section titled “URL Parameters (Path)”| Parameter | Type | Description | Required |
|---|---|---|---|
schoolId | string | Identifier of the school whose classes will be listed. | Yes |
URL Parameters (Query)
Section titled “URL Parameters (Query)”| Parameter | Type | Description | Required |
|---|---|---|---|
code | string | Filter classes by code. | No |
title | string | Filter classes by title. | No |
page | string | Page number of class records to display. | No |
perPage | number | Number of records per page. Maximum allowed: 100. | No |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
data | array | List of classes. |
data.id | number | Unique identifier of the class. |
data.schoolId | number | Identifier of the associated school. |
data.title | string | Class title. |
data.code | string | Class code. |
data.image | string | Class image URL. |
data.course | string | Name of the associated course. |
data.group | array | List of groups associated with the class. |
data.subgroups | array | List of subgroups associated with the class. |
data.specialties | array | List of specialties associated with the class. |
data.trails | array | List of trails associated with the class. |
data.createdAt | string | Date and time the class was created. |
data.updatedAt | string | Date and time the class was last updated. |
meta | object | Response metadata. |
meta.total | number | Total number of classes. |
meta.per_page | number | Number of items per page. |
meta.current_page | number | Current page number. |
meta.last_page | number | Last page number. |
meta.first_page_url | string | URL of the first page. |
meta.last_page_url | string | URL of the last page. |
meta.next_page_url | string | URL of the next page (if available). |
meta.prev_page_url | string | URL of the previous page (if available). |
meta.from | number | Index of the first item on the current page. |
meta.to | number | Index of the last item on the current page. |
Security
Section titled “Security”To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.