DiveLogController::index().{user} must be the student of the course log (course_logs.user_id) and the caller must be its instructor (course_logs.instructor_id). Any mismatch, an unknown log_code included, answers 403.App\Http\Controllers\Api\V1\Professional\DiveLogController::index()api.v1.professional.dive-logs.indexAuthorization: Bearer {token}role:professional. A user without the professional role receives 403 (body not captured).GET/api/v1/professional/dive-logs/{user}/{log_code}| Parameter | Type | Description |
|---|---|---|
{user} | integer | Id of the student of the course log. Not the instructor's own id |
{log_code} | string(32) | Course log code, as returned by GET /api/v1/professional/students. Not a primary key |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | No | 1 | Page number. The page size is fixed at 20 |
200 OK{
"success": true,
"status": "success",
"message": "OK",
"data": {
"data": [
{
"id": 623829,
"uuid": "6560b3f5-6d71-4f25-a769-6d593c024844",
"number": 8,
"date": "2025-12-29 19:41:00",
"dive_type": "shore",
"purpose_type": "course_log",
"location": "Example Site",
"country": "ZA",
"lat": null,
"lon": null,
"dive_config": "open_circuit",
"gas": "air",
"gas_mix": {
"helium": 0,
"nitrogen": 79,
"oxygen": 21
},
"max_depth": 12,
"average_depth": 6,
"depth_unit": "meters",
"dive_time": 45,
"abt": 45,
"rnt": 0,
"tbt": 45,
"tts": 0,
"pressure_start": null,
"pressure_end": null,
"pressure_unit": "bar",
"water_temperature": null,
"weather_temperature": null,
"temperature_unit": "celsius",
"weather": "sunny",
"water": "calm",
"current": "no_current",
"visibility": "good",
"weights": null,
"weights_unit": "kilogram",
"buddy": "",
"verified_by": "XX14-000-001 - Example Instructor",
"wetsuit": "",
"sac_rate": null,
"safety_stop": false,
"has_decompression": false,
"decompression_note": "",
"mod": null,
"end": null,
"group_in": "",
"group_out": "",
"comments": "Example student declaration.",
"log_code": "9d3f6a1b2c4e4f7a8b0c1d2e3f4a5b6c",
"course_id": 67,
"skill_log_id": 238236,
"skill_id": 2536,
"instructor_id": 5454,
"is_signed": false,
"signed_at": null,
"cylinder_count": null,
"bottom_cylinder_volume": null,
"dive_condition_notes": ""
},
{
"id": 623830,
"uuid": "6560b3f5-6d71-4f25-a769-6d593c024844",
"number": 9,
"date": "2025-12-29 19:41:00",
"dive_type": "shore",
"purpose_type": "course_log",
"location": "Example Site",
"country": "ZA",
"lat": null,
"lon": null,
"dive_config": "open_circuit",
"gas": "air",
"gas_mix": {
"helium": 0,
"nitrogen": 79,
"oxygen": 21
},
"max_depth": 12,
"average_depth": 6,
"depth_unit": "meters",
"dive_time": 45,
"abt": 45,
"rnt": 0,
"tbt": 45,
"tts": 0,
"pressure_start": null,
"pressure_end": null,
"pressure_unit": "bar",
"water_temperature": null,
"weather_temperature": null,
"temperature_unit": "celsius",
"weather": "sunny",
"water": "calm",
"current": "no_current",
"visibility": "good",
"weights": null,
"weights_unit": "kilogram",
"buddy": "",
"verified_by": "XX14-000-001 - Example Instructor",
"wetsuit": "",
"sac_rate": null,
"safety_stop": false,
"has_decompression": false,
"decompression_note": "",
"mod": null,
"end": null,
"group_in": "",
"group_out": "",
"comments": "Example student declaration.",
"log_code": "9d3f6a1b2c4e4f7a8b0c1d2e3f4a5b6c",
"course_id": 67,
"skill_log_id": 238236,
"skill_id": 2537,
"instructor_id": 5454,
"is_signed": false,
"signed_at": null,
"cylinder_count": null,
"bottom_cylinder_volume": null,
"dive_condition_notes": ""
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 8
}
}
}data.data is a DiveLogResource collection, docs/api/diver/_resources.md -> "Dive log", the same entry shape as GET /api/v1/diver/dive-logs. Every entry carries its id, the value to use in GET /api/v1/professional/dive-logs/{diveLog} and POST /api/v1/professional/dive-logs/{diveLog}/sign.| Field | Type | Nullable | Always present | Description |
|---|---|---|---|---|
data.data | array | No | Yes | Dive logs of the page, date descending. Empty array when the course log has none |
data.meta.current_page | integer | No | Yes | |
data.meta.last_page | integer | No | Yes | |
data.meta.per_page | integer | No | Yes | Always 20 |
data.meta.total | integer | No | Yes | Dive logs of the student on this log_code |
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 Forbiddenprofessional role, or when no course log matches the three conditions log_code, user_id = {user} and instructor_id = caller. The second case uses the standard envelope:{
"success": false,
"status": "error",
"message": "Forbidden"
}429 Too Many Requestsx-ratelimit-limit: 120. The body is the standard envelope with message: "Too many requests" and a Retry-After header.log_code, whoever is named in dive_logs.instructor_id. show and sign check dive_logs.instructor_id, so an entry of this list can answer 403 there.{user} then {log_code}. Before this fix the route answered 403 for every call.docs/api/professional/dive-logs/GET_list.mdcurl --location 'https://test.diveraid.com/api/v1/professional/dive-logs//?page=' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "string",
"data": {
"current_page": 0,
"data": [
{
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"number": 0,
"date": "2019-08-24",
"dive_type": "string",
"purpose_type": "string",
"location": "string",
"country": "string",
"lat": 0,
"lon": 0,
"dive_config": "string",
"gas": "string",
"gas_mix": {
"oxygen": 0,
"nitrogen": 0,
"helium": 0
},
"max_depth": 0,
"average_depth": 0,
"depth_unit": "string",
"dive_time": 0,
"abt": 0,
"rnt": 0,
"tbt": 0,
"tts": 0,
"pressure_start": 0,
"pressure_end": 0,
"pressure_unit": "string",
"water_temperature": 0,
"weather_temperature": 0,
"temperature_unit": "string",
"weather": "string",
"water": "string",
"current": "string",
"visibility": "string",
"weights": 0,
"weights_unit": "string",
"buddy": "string",
"verified_by": "string",
"wetsuit": "string",
"sac_rate": 0,
"safety_stop": true,
"has_decompression": true,
"decompression_note": "string",
"mod": 0,
"end": "2019-08-24T14:15:22.123Z",
"group_in": "string",
"group_out": "string",
"comments": "string",
"log_code": "string",
"course_id": 0,
"skill_log_id": 0,
"skill_id": 0,
"instructor_id": 0,
"is_signed": true,
"signed_at": "2019-08-24T14:15:22.123Z",
"cylinder_count": 0,
"bottom_cylinder_volume": 0,
"dive_condition_notes": "string"
}
],
"per_page": 0,
"total": 0,
"last_page": 0
}
}