RAID API
  1. Library
  • 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 classroom progress (all students)
        • Get classroom student progress
        • Sign classroom student skills
        • Get classroom student exam result
        • Get classroom student quiz result
        • Get classroom student skills
      • 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
        GET
      • List the current RAID standards
        GET
  • 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. Library

List the RAID document library

GET
https://test.diveraid.com/api/v1/library/documents
Library
Maintainer:Not configured

Overview#

Lists the RAID document library the website shows under Documents, with a link for each file. The answer has one group per area the user can read, in a fixed order: diver; for a professional also professional and the areas of the qualification (trainer adds trainer; examiner adds trainer, examiner; itt adds trainer, examiner, itt; tec examiner adds trainer, examiner, itt, tec_examiner). Open to every authenticated user, whatever the role. Served by LibraryController::documents().
Controller: App\Http\Controllers\Api\V1\Library\LibraryController::documents()
Route name: api.v1.library.documents

Authentication#

Type: Bearer Token (Sanctum)
Header: Authorization: Bearer {token}
Additional middleware: none. No role is required.

Request#

Method: GET
Path: /api/v1/library/documents

Query parameters#

ParameterTypeRequiredDescription
localestringNoLanguage of the files. One of en, ar, de, es, fr, it, ko, nl, pt, tr, zh, pl, ru. Default: the request locale. Any other value answers 422.
No body.

Example request#


Response 200 OK#

The body below is the one asserted by tests/Api/Library/LibraryDocumentsTest.php ("returns the keys and values of a group and a file"), for a diver with one file. Ids, name and size are those of the stored file.
{
  "success": true,
  "status": "success",
  "message": "Documents",
  "data": [
    {
      "area": "diver",
      "area_label": "Diver",
      "available_locales": ["en"],
      "files": [
        {
          "id": 4821,
          "name": "diver-manual",
          "file_name": "diver-manual.pdf",
          "mime_type": "application/pdf",
          "size": 26,
          "folder": "Courses",
          "url": "https://raid-backend.s3.eu-west-2.amazonaws.com/media/4821/diver-manual.pdf"
        }
      ]
    }
  ]
}

Response fields#

FieldTypeNullableAlways presentDescription
dataarrayNoYesOne group per readable area, in the order described in the overview. Not paginated.
data[].areastringNoYesOne of diver, professional, trainer, examiner, itt, tec_examiner.
data[].area_labelstringNoYesLabel of the area.
data[].available_localesarray<string>NoYesSorted locales in which the area holds at least one file, whatever the requested locale. Empty when the area has no file.
data[].filesarrayNoYesThe files of the area in the requested locale, sorted by folder and then file_name. Empty when there are none.
data[].files[].idintegerNoYesMedia id.
data[].files[].namestringNoYesDisplay name of the file.
data[].files[].file_namestringNoYesFile name, with extension.
data[].files[].mime_typestringYesYesMIME type of the file.
data[].files[].sizeintegerNoYesSize in bytes.
data[].files[].folderstringNoYesFolder path without the root folder, folder names joined by /. Empty string for a file in the root.
data[].files[].urlstringNoYesPlain link to the file: the library disk is public.

Errors#

401 Unauthorized#

{
  "success": false,
  "status": "error",
  "message": "Unauthenticated"
}

422 Unprocessable Entity#

locale is not one of the supported locales. The body is the one asserted by "rejects an unknown locale".
{
  "success": false,
  "status": "error",
  "message": "Validation failed",
  "errors": {
    "locale": ["The selected locale is invalid."]
  }
}

Notes#

Read-only, no side effects.
The request locale is the locale the API resolves for the request (the user's language when set, otherwise Accept-Language).
url is a plain link, not a signed one: the media disk is public.
The media are read in one query and the folder paths in one query: the response time does not depend on the number of folders.

Source: docs/api/library/GET_documents.md

Request

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

Responses

🟢200
application/json
Success
Bodyapplication/json

🟠401
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://test.diveraid.com/api/v1/library/documents?locale=' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "success": true,
    "status": "success",
    "message": "Documents",
    "data": [
        {
            "area": "diver",
            "area_label": "string",
            "available_locales": [
                "string"
            ],
            "files": [
                {
                    "id": 0,
                    "name": "string",
                    "file_name": "string",
                    "mime_type": "string",
                    "size": 0,
                    "folder": "string",
                    "url": "string"
                }
            ]
        }
    ]
}
Modified at 2026-11-16 13:50:12
Previous
Full detail of one publicly visible dive centre
Next
List the current RAID standards
Built with