course_logs.instructor_id), one entry per student enrollment. It is the entry point of the students area: the log_code of each entry is the {log_code} parameter of every other students route. Served by StudentController::index().App\Http\Controllers\Api\V1\Professional\StudentController::index()api.v1.professional.students.indexAuthorization: Bearer {token}role:professional. A user without the professional role receives 403.GET/api/v1/professional/studentsinstructor_id is the caller is returned in one response, whatever the course or the status.200 OK{
"success": true,
"status": "success",
"message": "OK",
"data": [
{
"log_code": "9d3f6a1b2c4e4f7a8b0c1d2e3f4a5b6c",
"student_id": 700001,
"student_name": "Example Student",
"student_raid_id": "IT26-300-003",
"course_id": 301,
"course_name": "Explorer 30",
"status": null,
"start_date": null,
"expire_date": "2019-04-09",
"is_repetition": false,
"repetition": null,
"team_leader": {
"id": 700002,
"raid_id": "IT26-200-002",
"full_name": "Example Team Leader"
}
},
{
"log_code": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
"student_id": 700003,
"student_name": "Another Student",
"student_raid_id": "IT26-400-004",
"course_id": 301,
"course_name": "Explorer 30",
"status": null,
"start_date": null,
"expire_date": "2019-06-01",
"is_repetition": false,
"repetition": null,
"team_leader": null
}
]
}data is a plain array. It is empty ([]) when the caller is the instructor of no course log.| Field | Type | Nullable | Always present | Description |
|---|---|---|---|---|
data[].log_code | string(32) | No | Yes | Opaque course log code. Not a primary key. Pass it to the students/{log_code} routes |
data[].student_id | integer | No | Yes | User id of the student |
data[].student_name | string | Yes | Yes | Full name of the student. null when the user no longer exists |
data[].student_raid_id | string | Yes | Yes | RAID ID of the student, public and immutable. null when the user no longer exists (the column itself is nullable) |
data[].course_id | integer | No | Yes | Course id |
data[].course_name | string | Yes | Yes | Course name. null when the course no longer exists |
data[].status | TO VERIFY | Yes | Yes | Course log status. null on all 17 entries of the capture; the set of values was not captured |
data[].start_date | string | Yes | Yes | YYYY-MM-DD. null on all 17 entries of the capture |
data[].expire_date | string | Yes | Yes | YYYY-MM-DD |
data[].is_repetition | boolean | No | Yes | true when the course log repeats a non-certifying course the student already holds (ADR-0029). A repetition needs no quiz, exam or skills, and the write routes refuse them |
data[].repetition | object | Yes | Yes | null unless is_repetition is true |
data[].repetition.confirmed_at | string | Yes | When repetition is set | ISO 8601, when the assigned instructor confirmed the in-water dive. null until confirmed |
data[].repetition.confirmed_by | object | Yes | When repetition is set | id, full_name of the instructor who confirmed. null until confirmed |
data[].team_leader | object | Yes | Yes | The instructor of the classroom the course log belongs to. null when the course log is not in a classroom, or when that instructor no longer exists |
data[].team_leader.id | integer | No | When team_leader is set | User id of the team leader |
data[].team_leader.raid_id | string | Yes | When team_leader is set | RAID ID of the team leader |
data[].team_leader.full_name | string | No | When team_leader is set | Full name of the team leader |
student_name and course_name comes from the controller source (null-safe access); a null was not observed.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 (role:professional middleware). Body not captured.429 Too Many Requestsx-ratelimit-limit: 120. The body is the standard envelope with message: "Too many requests" and a Retry-After header.classrooms.instructor_id), not necessarily the instructor of the course log (course_logs.instructor_id, which is the caller here). On the development database 4 course logs have a classroom run by a different instructor than their own.GET /api/v1/professional/classroom, the list is keyed on the course log's own instructor_id, not on classrooms.docs/api/professional/students/GET_list.mdcurl --location 'https://test.diveraid.com/api/v1/professional/students' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "string",
"data": [
{
"log_code": "string",
"student_id": 0,
"student_name": "string",
"student_raid_id": "string",
"course_id": 0,
"course_name": "string",
"status": "string",
"start_date": "2019-08-24",
"expire_date": "2019-08-24",
"is_repetition": true,
"repetition": {
"confirmed_at": "2019-08-24T14:15:22.123Z",
"confirmed_by": {
"id": 0,
"full_name": "string"
}
},
"team_leader": {
"id": 0,
"raid_id": "string",
"full_name": "string"
}
}
]
}