Session Students

Create session-student relationship

Changed on

Associate each given student with each given session, creating an entry in the bridge table

post/session_students

Request

  • Base URL: http://localhost:8080/api/v1
  • URL: http://localhost:8080/api/v1/session_students
  • Auth: none declared

Request body

session_idsstring[] required

List of all Sessions' UUIDs

student_idsstring[] required

List of all Students' UUIDs

presentboolean

Whether the student was present (defaults to true if not specified)

notesstring nullable

Initial notes about the student's participation

Example request

{
  "present": true,
  "notes": "First session with new group"
}

Response

Session-student relationship created successfully

idinteger

Unique identifier for the session-student relationship

session_idstring uuid required

UUID of the session

student_idstring uuid required

UUID of the student

presentboolean required

Whether the student was present at the session

notesstring nullable

Notes about the student's participation in the session

created_atstring date-time required

When the relationship was created

updated_atstring date-time required

When the relationship was last updated

Example response

[
  {
    "id": 1,
    "session_id": "123e4567-e89b-12d3-a456-426614174000",
    "student_id": "987fcdeb-51a2-43d1-9f4c-123456789abc",
    "present": true,
    "notes": "Student actively participated in group activities",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:35:00Z"
  }
]

Changes

    • ○

      added the optional property / to the response with the status

    • ▲

      added the new required request property

    • ▲

      added the new required request property

    • ▲

      the response's body type changed from object to array for status

    • ▲

      removed the required property from the response with the status

    • ▲

      removed the required property from the response with the status

    • ▲

      removed the required property from the response with the status

    • ▲

      removed the required property from the response with the status

    • ▲

      removed the required property from the response with the status

    • ●

      removed the request property

    • ●

      removed the request property

    • ●

      removed the optional property from the response with the status