RAID API
  1. Classroom
  • DiveRAID frontend public API
    • Search divers
      POST
    • Search instructors
      POST
    • Search dive centers
      POST
    • Search dive centers by country
      GET
  • DiveRAID rest API V1
    • Auth
      • Register a new user
      • Login and get a Sanctum token
      • Send password reset email
      • Reset password using token
      • Logout and revoke the current token
      • Resend email verification
      • Complete a two-factor login and get a Sanctum token
    • Profile
      • The user resource
      • Get authenticated user profile
      • Update profile
      • Register push token
      • Update password
      • Remove push token
      • Rotate exam unlock code
      • Delete account
      • Update dive center association
    • Diver
      • Shared diver resources
      • Courses
        • List active courses
        • Get exam result
        • Submit course exam
        • Sign skills (diver)
        • Get course detail
        • Submit module quiz
        • List expired courses
        • Get quiz result
        • Get skills progress
      • Free Learnings
        • List enrolled free learnings
        • Get free learning quiz result
        • List available free learning courses
        • Submit free learning module quiz
        • Get free learning detail
        • Enroll in a free learning course
      • Certifications
        • Get certification history
        • Get certification quiz result
        • Get certification exam result
        • Get certification skills
        • List diver certifications
      • Dive Logs
        • Delete dive log
        • Create dive log
        • Update dive log
        • List loggable courses
        • List dive logs (paginated)
        • Get dive log
      • Awards
        • List the recognition cards issued to the user
      • Documents
        • Upload own medical certificate or insurance
        • List own medical certificates and insurance
        • List diver documents
      • Forms
        • List diver forms
      • Medical
        • Get medical questionnaire structure
        • Submit medical questionnaire
      • Store
        • List courses available for purchase
        • Get order status
    • Professional
      • Students
        • List students
        • Get student progress
        • Sign student skills
        • Get student exam result
        • Get student quiz result
        • Get student skills progress
      • Certifications
        • Get certification history
        • Get certification quiz result
        • Get certification exam result
        • Get certification skills
        • List all professional certifications
        • List diver-level certifications
        • List examiner certifications
        • List professional certifications
        • List specialty certifications
        • List trainer certifications
      • Classroom
        • List classrooms
          GET
        • Get classroom progress (all students)
          GET
        • Get classroom student progress
          GET
        • Sign classroom student skills
          POST
        • Get classroom student exam result
          GET
        • Get classroom student quiz result
          GET
        • Get classroom student skills
          GET
      • Renewals
        • List renewal courses
        • Get renewal exam result
        • Submit renewal exam
        • Sign renewal skills
        • Renewal status
        • Get renewal progress
        • Submit renewal module quiz
        • Get renewal quiz result
        • Get renewal skills progress
      • Dive Logs
        • Get student dive log
        • Sign student dive log
        • List student dive logs for a course
    • Sync
      • Download full course data for offline use
      • Upload offline operations
      • Get sync status
    • Public
      • List all countries
      • Dive-log enum values with labels in the response language
      • Get country data
      • Get country divisions (states/provinces)
      • List time zone identifiers, optionally narrowed to one country
      • List, search, and radius-search publicly visible dive centres
      • Every publicly visible, geolocated dive centre as a map marker
      • Countries with at least one publicly visible dive centre
      • Full detail of one publicly visible dive centre
    • Library
      • List the RAID document library
      • List the current RAID standards
  • Schemas
    • Frontend API Schema
      • DiverSearch
    • SuccessResponse
    • DiverCertification
    • ValidationErrorResponse
    • TwoFactorChallengeResponse
    • TokenResponse
    • IssuedCertification
    • ErrorResponse
    • DiveLog
    • ExamResult
    • QuizResult
    • CourseLogDetail
    • CourseLog
    • UserProfile
    • SkillProgress
    • Certification
    • PaginatedDiveLogs
    • StoreItem
    • PaymentIntentResponse
    • OrderConfirmResponse
    • OrderStatusResponse
    • InstructorSearch
    • DiveCenterSearch
  1. Classroom

List classrooms

GET
https://test.diveraid.com/api/v1/professional/classroom
Professional / Classroom
Maintainer:Not configured

Overview#

Lists the classrooms owned by the authenticated instructor, with the course, the dive center and the number of students enrolled in each. It is the entry point of the classroom area: the id of each entry is the {classroom} parameter of GET /api/v1/professional/classroom/{classroom}. Served by ClassroomController::index().
Controller: App\Http\Controllers\Api\V1\Professional\ClassroomController::index()
Route name: api.v1.professional.classroom.index

Authentication#

Type: Bearer Token (Sanctum)
Header: Authorization: Bearer {token}
Additional middleware: role:professional. A user without the professional role receives 403.

Request#

Method: GET
Path: /api/v1/professional/classroom
No path parameters, no query parameters, no body. The list is not paginated and cannot be filtered: every classroom whose instructor_id is the caller is returned.

Example request#


Response 200 OK#

Captured live. Names and ids are examples.
{
  "success": true,
  "status": "success",
  "message": "OK",
  "data": [
    {
      "id": 4001,
      "name": "CAVERN DIVER @ 2025-01-10",
      "course": {
        "id": 301,
        "name": "Cavern"
      },
      "dive_center": {
        "id": 501,
        "name": "Example Dive Academy"
      },
      "students_count": 1,
      "is_crossover": false,
      "is_level_up": false,
      "created_at": "2025-01-10"
    }
  ]
}

Response fields#

data is a plain array, ordered as the database returns it. It is empty ([]) when the instructor owns no classroom.
FieldTypeNullableAlways presentDescription
data[].idintegerNoYesClassroom id. Pass it to GET /api/v1/professional/classroom/{classroom}
data[].namestringNoYesClassroom name
data[].course.idintegerNoYesCourse id
data[].course.namestringYesYesCourse name. null when the course no longer exists
data[].dive_center.idintegerYesYesDive center id
data[].dive_center.namestringYesYesDive center name. null when the classroom has no dive center
data[].students_countintegerNoYesNumber of course logs enrolled in the classroom
data[].is_crossoverbooleanNoYesWhether the classroom runs a crossover course
data[].is_level_upbooleanNoYesWhether the classroom runs a level-up course
data[].created_atstringYesYesCreation date, YYYY-MM-DD
The nullability of course.name, dive_center.id and dive_center.name comes from the controller source (null-safe access); a null was not observed in the capture.

Errors#

401 Unauthorized#

{
  "success": false,
  "status": "error",
  "message": "Unauthenticated"
}
message is Token expired or Invalid token when a bearer token was sent but is expired or unknown.

403 Forbidden#

Returned when the authenticated user does not have the professional role (role:professional middleware). Body not captured.

429 Too Many Requests#

The route sits behind the API rate limiter; the live responses carried x-ratelimit-limit: 120. The body is the standard envelope with message: "Too many requests" and a Retry-After header.

Notes#

Read-only, no side effects.
students_count counts the classroom's non-deleted course logs; it is computed with one query for the whole list, whatever the number of classrooms. Its value is unchanged.
The response does not list the students: use GET /api/v1/professional/classroom/{classroom} for them.

Source: docs/api/professional/classroom/GET_list.md

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or

Responses

🟢200
application/json
Success
Bodyapplication/json

🟠401
🟠403
🟠429
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://test.diveraid.com/api/v1/professional/classroom' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "status": "success",
    "message": "string",
    "data": [
        {
            "id": 0,
            "name": "string",
            "course": {
                "id": 0,
                "name": "string"
            },
            "dive_center": {
                "id": 0,
                "name": "string"
            },
            "students_count": 0,
            "is_crossover": true,
            "is_level_up": true,
            "created_at": "2019-08-24"
        }
    ]
}
Modified at 2026-10-08 12:38:04
Previous
List trainer certifications
Next
Get classroom progress (all students)
Built with