> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seamind.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Current User Courses

> Get all courses assigned to the current user via assignment_courses.

Returns courses with full context (status, assignment, ship, curriculum).
Courses are sourced from assignment_courses table, with registration status
joined when available (None if course not yet started).

By default, only includes courses from active assignments (not ended).
Use include_past=true to include courses from ended assignments.



## OpenAPI

````yaml /openapi.json get /api/v1/shared/users/me/courses
openapi: 3.1.0
info:
  title: Seamind Backend
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/shared/users/me/courses:
    get:
      tags:
        - shared-users
      summary: Get Current User Courses
      description: >-
        Get all courses assigned to the current user via assignment_courses.


        Returns courses with full context (status, assignment, ship,
        curriculum).

        Courses are sourced from assignment_courses table, with registration
        status

        joined when available (None if course not yet started).


        By default, only includes courses from active assignments (not ended).

        Use include_past=true to include courses from ended assignments.
      operationId: get_current_user_courses_api_v1_shared_users_me_courses_get
      parameters:
        - name: include_past
          in: query
          required: false
          schema:
            type: boolean
            description: Include courses from ended assignments
            default: true
            title: Include Past
          description: Include courses from ended assignments
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserCoursesResponseDTO'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UserCoursesResponseDTO:
      properties:
        courses:
          items:
            $ref: '#/components/schemas/UserCourseDTO'
          type: array
          title: Courses
      type: object
      required:
        - courses
      title: UserCoursesResponseDTO
      description: Response wrapper for user's courses endpoint.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserCourseDTO:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        imagePath:
          type: string
          title: Imagepath
          default: course-images/default.webp
        registrationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Registrationid
        status:
          $ref: '#/components/schemas/CourseProgressStatus'
        completedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completedat
        scorePercent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scorepercent
        timeSpentSeconds:
          type: integer
          title: Timespentseconds
          default: 0
        hasFeedback:
          type: boolean
          title: Hasfeedback
          default: false
        assignmentId:
          type: string
          format: uuid
          title: Assignmentid
        shipId:
          type: string
          format: uuid
          title: Shipid
        shipName:
          type: string
          title: Shipname
        role:
          type: string
          title: Role
        assignmentStartDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Assignmentstartdate
        courseDueDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Courseduedate
        assignmentEndDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Assignmentenddate
        isAssignmentActive:
          type: boolean
          title: Isassignmentactive
        assignedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Assignedat
        curriculumId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Curriculumid
        curriculumTitle:
          anyOf:
            - type: string
            - type: 'null'
          title: Curriculumtitle
        isOverdue:
          type: boolean
          title: Isoverdue
        daysUntilDue:
          anyOf:
            - type: integer
            - type: 'null'
          title: Daysuntildue
      type: object
      required:
        - id
        - title
        - description
        - status
        - assignmentId
        - shipId
        - shipName
        - role
        - assignmentStartDate
        - courseDueDate
        - assignmentEndDate
        - isAssignmentActive
        - curriculumId
        - curriculumTitle
        - isOverdue
        - daysUntilDue
      title: UserCourseDTO
      description: Course with full context for user's library view.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CourseProgressStatus:
      type: string
      enum:
        - not_started
        - in_progress
        - completed
        - failed
      title: CourseProgressStatus
      description: |-
        A course's status from the learner's perspective in the library view.

        A superset of RegistrationStatus: `not_started` is synthetic (no
        registration row exists yet); the rest mirror the registration's status.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````