openapi: 3.1.0
info:
  title: PowerPath API
  version: 1.0.0
  description: >
    TimeBack PowerPath 100 API


    # Authentication


    All endpoints require authentication using the `Authorization: Bearer
    <token>` header.


    The token can be obtained with:


    ```

    curl -X POST
    https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/token
    \

    -H "Content-Type: application/x-www-form-urlencoded" \

    -d
    "grant_type=client_credentials&client_id=<your-client-id>&client_secret=<your-client-secret>"

    ```


    Use the correct IDP server depending on the environment you're using:


    IDP Server for this environment:

    ```

    https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com

    ```


    Reach out to the platform team to get a client/secret pair for your
    application.


    # Pagination


    Our API uses offset pagination for list endpoints. Paginated responses
    include the following fields:


    - `offset`: Offset for the next page of results

    - `limit`: Number of items per page (default: 100, maximum: 3000)


    **Note:** While the OneRoster specification does not define a maximum limit,
    this implementation enforces a maximum of 3000 items per page to prevent
    abuse and ensure optimal performance.


    Example request:


    ```

    GET /ims/oneroster/rostering/v1p2/users?offset=20&limit=20

    ```


    All listing endpoints support offset pagination.


    # Filtering


    All listing endpoints support filtering using the `filter` query parameter,
    following 1EdTech's filtering specification.


    The filter should be a string with the following format:


    ```

    ?filter=[field][operator][value]

    ```


    Example request:


    ```

    GET /ims/oneroster/rostering/v1p2/users?filter=status='active'

    ```


    Example request with multiple filters:


    ```

    GET /ims/oneroster/rostering/v1p2/users?filter=status='active' AND
    name='John'

    ```


    **Filtering by nested relations is not supported**.


    # Sorting


    All listing endpoints support sorting using the `sort` and `orderBy` query
    parameters, following 1EdTech's sorting specification


    Example request:


    ```

    GET /ims/oneroster/rostering/v1p2/users?sort=lastName&orderBy=asc

    ```


    # Proprietary Extensions


    This implementation includes proprietary extensions that extend beyond the
    official OneRoster 1.2 specification to provide additional functionality.


    ## Search Parameter


    In addition to the standard `filter` parameter, this implementation provides
    a `search` query parameter for simplified free-text searching:


    ```

    GET /ims/oneroster/rostering/v1p2/users?search=john

    ```


    **Purpose**: The `search` parameter enables convenient text-based queries
    across multiple fields simultaneously, whereas the standard `filter`
    parameter requires specifying exact field names and operators:


    ```

    # Search parameter - searches across multiple fields automatically

    GET /ims/oneroster/rostering/v1p2/users?search=john


    # Equivalent using standard filter parameter

    GET /ims/oneroster/rostering/v1p2/users?filter=givenName~'john' OR
    familyName~'john'

    ```


    The `search` parameter performs case-insensitive partial matching across
    predefined fields for each endpoint, providing a more user-friendly querying
    experience.


    ## OneRoster 1.2 Standard Parameters


    The official OneRoster 1.2 specification defines these standard parameters:


    - `limit` - pagination limit

    - `offset` - pagination offset

    - `sort` - field to sort by

    - `orderBy` - sort direction (asc/desc)

    - `filter` - filtering expression

    - `fields` - field selection


    ## Affected Endpoints


    The proprietary `search` parameter is available on the following endpoints:


    **Rostering API**:


    - `GET /ims/oneroster/rostering/v1p2/academicSessions/`

    - `GET /ims/oneroster/rostering/v1p2/classes/`

    - `GET /ims/oneroster/rostering/v1p2/classes/{classSourcedId}/students`

    - `GET /ims/oneroster/rostering/v1p2/classes/{classSourcedId}/teachers`

    - `GET /ims/oneroster/rostering/v1p2/courses/`

    - `GET /ims/oneroster/rostering/v1p2/courses/{courseSourcedId}/classes`

    - `GET /ims/oneroster/rostering/v1p2/demographics/`

    - `GET /ims/oneroster/rostering/v1p2/enrollments/`

    - `GET
    /ims/oneroster/rostering/v1p2/schools/{schoolSourcedId}/classes/{classSourcedId}/students`

    - `GET /ims/oneroster/rostering/v1p2/users/`


    **Gradebook API**:


    - `GET /ims/oneroster/gradebook/v1p2/assessmentLineItems/`

    - `GET /ims/oneroster/gradebook/v1p2/assessmentResults/`

    - `GET
    /ims/oneroster/gradebook/v1p2/classes/{classSourcedId}/students/{studentSourcedId}/results`

    - `GET /ims/oneroster/gradebook/v1p2/results/`


    **Resources API**:


    - `GET /ims/oneroster/resources/v1p2/resources/`


    ## Parameter Usage Guide


    ### Filter Parameter


    The standard `filter` parameter provides precise control over queries using
    these operators:


    - `=` - Exact match

    - `!=` - Not equal

    - `~` - Contains (case-insensitive)

    - `>`, `>=`, `<`, `<=` - Comparison operators

    - `@` - In list (comma-separated values)


    ### Logical Operators


    Combine multiple conditions in filter expressions:


    - `AND` - Both conditions must be true

    - `OR` - Either condition must be true


    ### Usage Examples


    ```bash

    # Simple text search across multiple fields

    GET /users?search=john


    # Equivalent precise filtering

    GET /users?filter=givenName~'john' OR familyName~'john'


    # Complex filtering with multiple conditions

    GET /users?filter=status='active' AND givenName~'john'


    # Advanced filtering with different operators

    GET /users?filter=dateLastModified>'2023-01-01' AND status='active'

    ```


    ## Search Fields by Endpoint


    Different endpoints search across these predefined fields:


    - **Users**: `givenName`, `familyName`, `email`

    - **Courses**: `title`, `courseCode`

    - **Classes**: `title`

    - **Organizations**: `name`


    ## Interoperability Notes


    The `search` parameter is a proprietary extension specific to this
    implementation. Other OneRoster-compliant systems may only support the
    standard `filter` parameter. When building applications that need to work
    with multiple OneRoster providers, consider using the standard filtering
    approach.


    ## Additional Schema Fields


    ### AssessmentLineItem Extensions


    The AssessmentLineItem schema includes two proprietary fields that extend
    curriculum mapping capabilities:


    #### Component Field


    - **Field**: `component`

    - **Type**: Object reference (`{ sourcedId: string }`)

    - **Purpose**: Direct association between assessment line items and course
    components, enabling enhanced curriculum mapping and learning pathway
    tracking.


    #### ComponentResource Field


    - **Field**: `componentResource`

    - **Type**: Object reference (`{ sourcedId: string }`)

    - **Purpose**: Direct association between assessment line items and specific
    learning resources, supporting detailed content-to-assessment relationships
    and adaptive learning features.


    **Example Usage**:


    ```json

    {
      "sourcedId": "assessment-123",
      "title": "Chapter 5 Quiz",
      "component": { "sourcedId": "component-456" },
      "componentResource": { "sourcedId": "resource-789" }
    }

    ```


    ## Affected Endpoints


    ### Schema Extensions Availability


    The proprietary schema fields are available in:


    **Gradebook API**:


    - `GET /ims/oneroster/gradebook/v1p2/assessmentLineItems/` - Returns
    assessmentLineItems with `component` and `componentResource` fields

    - `GET /ims/oneroster/gradebook/v1p2/assessmentLineItems/{sourcedId}` -
    Returns individual assessmentLineItem with extended fields

    - `POST /ims/oneroster/gradebook/v1p2/assessmentLineItems/` - Accepts
    `component` and `componentResource` in request body

    - `PUT /ims/oneroster/gradebook/v1p2/assessmentLineItems/{sourcedId}` -
    Accepts extended fields for updates
servers:
  - url: https://api.alpha-1edtech.ai
    description: PowerPath API
tags:
  - name: PowerPath - Course Mastery
  - name: PowerPath - Course Sequence
    description: >-
      Manage course sequences and query course sequence to get the next stage in
      the student learning path
  - name: PowerPath - Lesson Mastery
    description: >-
      Track and manage student mastery of lesson objectives, through PowerPath
      100 lessons
  - name: PowerPath - Lesson Plans
    description: Manage lesson plans and instructional content
  - name: PowerPath - Placement
  - name: PowerPath - Test Assignments
  - name: PowerPath - Test Out
    description: >-
      Self-elected test-out endpoints for students to verify mastery and advance
      to the next grade level
security:
  - OAuth2: []
paths:
  /powerpath/placement/:studentId:
    get:
      operationId: getStudentPlacementData
      parameters:
        - in: path
          name: studentId
          description: The sourcedId of the student
          schema:
            type: string
            description: The sourcedId of the student
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Reading: &ref_1
                    type: object
                    properties:
                      startingGrade:
                        type: integer
                      currentGrade:
                        type: integer
                      highestGradeMastered:
                        type:
                          - integer
                          - 'null'
                      subjectLowestGrade:
                        type: integer
                      subjectHighestGrade:
                        type: integer
                      RIT:
                        type: object
                        properties:
                          GROWTH:
                            type: object
                            properties:
                              score:
                                type: integer
                              grade:
                                type: integer
                            required:
                              - score
                              - grade
                          SCREENING:
                            type: object
                            properties:
                              score:
                                type: integer
                              grade:
                                type: integer
                            required:
                              - score
                              - grade
                      results:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                testId:
                                  type: string
                                title:
                                  type: string
                                subject:
                                  type: string
                                grade:
                                  type: integer
                                status:
                                  type: string
                                  enum: &ref_0
                                    - PASSED
                                    - FAILED
                                    - STARTED
                                    - NOT_STARTED
                                    - SKIP
                                score:
                                  type: number
                                completedAt:
                                  type: string
                                source:
                                  type: string
                                  const: PLACEMENT
                                masteryTrackProcessed:
                                  type: boolean
                              required:
                                - testId
                                - title
                                - subject
                                - grade
                                - status
                                - source
                            - type: object
                              properties:
                                testId:
                                  type: string
                                title:
                                  type: string
                                subject:
                                  type: string
                                grade:
                                  type: integer
                                status:
                                  type: string
                                  enum: *ref_0
                                score:
                                  type: number
                                completedAt:
                                  type: string
                                source:
                                  type: string
                                  const: EDULASTIC
                              required:
                                - testId
                                - title
                                - subject
                                - grade
                                - status
                                - source
                      status:
                        type: string
                      nextTestId:
                        type:
                          - string
                          - 'null'
                    required:
                      - startingGrade
                      - currentGrade
                      - highestGradeMastered
                      - subjectLowestGrade
                      - subjectHighestGrade
                      - RIT
                      - results
                      - status
                      - nextTestId
                  Language: *ref_1
                  Vocabulary: *ref_1
                  Social Studies: *ref_1
                  Writing: *ref_1
                  Science: *ref_1
                  FastMath: *ref_1
                  Math: *ref_1
                  None: *ref_1
                  Other: *ref_1
                additionalProperties: false
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/test-out/getTestOutEligibility/{studentId}/{subject}:
    get:
      operationId: getTestOutEligibility
      summary: Check if a student is eligible to self-request a test-out
      description: >-

        Checks whether a student can self-request an assessment to test out of
        their current grade level for a given subject.


        The endpoint performs the following checks in order:

        1. Verifies the student has an active enrollment for the subject in a
        non-placeholder course (endDate is null or in the future, and course
        metadata does not have placementPlaceholder set to true)

        2. Fetches the student's highest grade mastered for the subject

        3. If the highest grade mastered is available, queries the
        assessment_results table for any existing fully-graded self-elected
        test-out at the next grade level (highestGradeMastered + 1)

        4. If the highest grade mastered is not available, falls back to the
        active course sequence to determine the lowest assessment grade for the
        subject and checks for a prior test-out at that grade


        Returns `eligible: true` if no prior test-out exists at the target
        grade.

        Returns `eligible: false` with a reason if the student has no qualifying
        active enrollment, or has already tested out.


        Subject matching is case-insensitive. Supported subjects: Math, Reading,
        Language, Science, Writing, Vocabulary.
            
      tags:
        - PowerPath - Test Out
      parameters:
        - name: studentId
          description: The OneRoster sourcedId of the student
          in: path
          required: true
          schema:
            type: string
        - name: subject
          description: The subject to check eligibility for
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Eligibility result
          content:
            application/json:
              schema:
                type: object
                properties:
                  eligible:
                    type: boolean
                    description: Whether the student is eligible to test out
                  reason:
                    type: string
                    description: >-
                      The reason the student is not eligible, only present when
                      eligible is false
                required:
                  - eligible
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/test-out/makeExternalStudentTestOutAssignment:
    post:
      operationId: makeExternalStudentTestOutAssignment
      summary: Create a self-elected student test-out assignment
      description: >-

        Creates an AlphaTest test-out assignment for a student on a given
        subject.


        The endpoint performs the following steps:

        1. Looks up the student's email using their OneRoster sourcedId

        2. Checks eligibility: the student must have an active enrollment in a
        non-placeholder course for the subject

        3. Fetches the student's highest grade mastered for the given subject

        4. If the highest grade mastered is available, assigns a test-out at the
        next grade level (highestGradeMastered + 1)

        5. If the highest grade mastered is not available, falls back to the
        active course sequence to determine the lowest assessment grade for the
        subject and uses that as the test-out grade


        The assignment payload sent to AlphaTest includes:

        - `test_type`: "test out"

        - `origin`: "self-elected"


        Will fail if:

        - The student does not exist or has no email

        - The student does not have an active enrollment for the subject (or the
        course has placementPlaceholder set to true)

        - The test-out grade cannot be determined (no highest grade mastered and
        no active course sequence with assessment stages)

        - The AlphaTest API returns an error
            
      tags:
        - PowerPath - Test Out
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                oneRosterSourcedId:
                  type: string
                  minLength: 1
                  description: >-
                    The OneRoster sourcedId of the student who will take the
                    test
                subject:
                  type: string
                  description: >-
                    The subject for which the student will test out (e.g. Math,
                    Reading, Language, Science, Writing, Vocabulary)
              required:
                - oneRosterSourcedId
                - subject
      responses:
        '200':
          description: Assignment created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    additionalProperties: {}
                required:
                  - success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '409':
          description: >-
            Student already has a pending test for this subject and grade. Use
            data.existing_assignment.test_url to direct the student to the
            existing test.
          content:
            application/json:
              schema:
                type: object
                properties:
                  httpStatus:
                    type: number
                    const: 409
                  success:
                    type: boolean
                    const: false
                  error:
                    type: string
                    example: Assignment already exists
                  data:
                    type: object
                    properties:
                      existing_assignment:
                        type: object
                        properties:
                          id:
                            type: number
                          test_url:
                            type: string
                          status:
                            type: string
                          test_name:
                            type: string
                          expires_at:
                            type: string
                        required:
                          - id
                          - test_url
                          - status
                          - test_name
                          - expires_at
                      message:
                        type: string
                    required:
                      - existing_assignment
                      - message
                required:
                  - httpStatus
                  - success
                  - error
                  - data
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/course-sequence/:
    get:
      operationId: getCourseSequences
      summary: Get course sequences
      description: >-

        Get the course sequences.

        ---

        Returns a list of all course sequences (`CourseSequenceHead` objects)
        available in the system.


        Heads do not contain stages.


        You can filter by status and subject.


        To get the active sequence for a subject, use
        `status=active&subject={subject}`.
            
      tags:
        - PowerPath - Course Sequence
      parameters:
        - in: query
          name: status
          schema:
            type: string
            enum: &ref_2
              - draft
              - active
              - retired
              - tobedeleted
        - in: query
          name: subject
          schema:
            $ref: '#/components/schemas/SubjectEnum'
      responses:
        '200':
          description: Course Sequence Heads
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The unique identifier of the course sequence
                        subject:
                          $ref: '#/components/schemas/SubjectEnum'
                          description: The subject of the course sequence.
                        title:
                          type: string
                          minLength: 1
                          maxLength: 255
                          description: The title of the course sequence.
                        description:
                          type: string
                          minLength: 0
                          maxLength: 1024
                          description: The description of the course sequence.
                        author:
                          type: string
                          format: email
                          description: The author of the course sequence.
                        status:
                          type: string
                          enum: *ref_2
                          description: The adoption status of the course sequence.
                        statusUpdatedAt:
                          type: string
                          format: date-time
                          pattern: Z$
                          description: >-
                            The timestamp when the adoption status was last
                            updated.
                      required:
                        - id
                        - subject
                        - title
                        - author
                        - status
                        - statusUpdatedAt
                required:
                  - items
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: string
                required:
                  - message
              examples: &ref_3
                invalidQueryParam:
                  message: Invalid path or query parameters
                  details: >-
                    [{"validation":"uuid","code":"invalid_string","message":"Invalid
                    uuid","path":["id"]}]
  /powerpath/course-sequence/:id:
    get:
      operationId: getCourseSequenceDetails
      summary: Get a single course sequence by id
      description: >-

        Get a single course sequence details.

        ---

        Returns a single course sequence (`CourseSequence` object). Details
        contain stages.
            
      tags:
        - PowerPath - Course Sequence
      parameters:
        - in: path
          name: id
          description: The unique identifier (UUID)
          schema:
            type: string
            format: uuid
            description: The unique identifier (UUID)
          required: true
      responses:
        '200':
          description: Course Sequence Details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The unique identifier of the course sequence
                  subject:
                    $ref: '#/components/schemas/SubjectEnum'
                    description: The subject of the course sequence.
                  title:
                    type: string
                    minLength: 1
                    maxLength: 255
                    description: The title of the course sequence.
                  description:
                    type: string
                    minLength: 0
                    maxLength: 1024
                    description: The description of the course sequence.
                  author:
                    type: string
                    format: email
                    description: The author of the course sequence.
                  status:
                    type: string
                    enum: *ref_2
                    description: The adoption status of the course sequence.
                  statusUpdatedAt:
                    type: string
                    format: date-time
                    pattern: Z$
                    description: The timestamp when the adoption status was last updated.
                  stages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: >-
                            The unique identifier of the stage. For course type
                            stages it is the course id.
                        title:
                          type: string
                          minLength: 1
                          maxLength: 255
                          description: >-
                            The title of the stage. For course type stages it is
                            the course title.
                        grades:
                          type: array
                          items:
                            type: string
                            enum: &ref_4
                              - '-1'
                              - '0'
                              - '1'
                              - '2'
                              - '3'
                              - '4'
                              - '5'
                              - '6'
                              - '7'
                              - '8'
                              - '9'
                              - '10'
                              - '11'
                              - '12'
                            description: The K-12 grade level associated with the stage.
                        subject:
                          $ref: '#/components/schemas/SubjectEnum'
                          description: The subject associated with the stage
                        type:
                          type: string
                          enum: &ref_5
                            - course
                            - assessment
                            - hole-filling
                          description: The type of the stage
                        properties:
                          type: object
                          properties:
                            courseReferences:
                              type: array
                              items:
                                type: object
                                properties:
                                  courseId:
                                    type: string
                                  refAddedAt:
                                    type: string
                                    format: date-time
                                    pattern: Z$
                                required:
                                  - courseId
                                  - refAddedAt
                            testTypes:
                              type: array
                              items:
                                type: string
                                enum: &ref_6
                                  - test_out
                                  - placement
                                  - end_of_course
                            learningAppId:
                              type: string
                              description: >-
                                Only for Hole-Filling stages. The id of the
                                learning app that should be used for the
                                hole-filling course.
                              examples: &ref_7
                                - alpha_write
                                - mobymax
                          description: The additional properties associated with the stage
                      required:
                        - id
                        - title
                        - grades
                        - subject
                        - type
                        - properties
                    description: The ordered list of stages in the course sequence.
                required:
                  - id
                  - subject
                  - title
                  - author
                  - status
                  - statusUpdatedAt
                  - stages
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: string
                required:
                  - message
              examples: *ref_3
  /powerpath/course-sequence/:id/stages:
    get:
      operationId: getCourseSequenceStages
      summary: Get stages of a single course sequence
      description: >-

        Get stages of a single course sequence.

        ---

        Returns a list of sequence stages (`CourseSequenceStage` objects) of the
        specified course sequence.


        To get the fist stage only, use `limit=1`.


        To filter by grade, use `grade={grade}`.


        To get the first stage of the specific grade, use
        `grade={grade}&limit=1`.
            
      tags:
        - PowerPath - Course Sequence
      parameters:
        - in: path
          name: id
          description: The unique identifier (UUID)
          schema:
            type: string
            format: uuid
            description: The unique identifier (UUID)
          required: true
        - in: query
          name: grade
          schema:
            type: string
            enum: *ref_4
        - in: query
          name: limit
          schema:
            type: string
      responses:
        '200':
          description: Course Sequence Stages
          content:
            application/json:
              schema:
                type: object
                properties:
                  stages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: >-
                            The unique identifier of the stage. For course type
                            stages it is the course id.
                        title:
                          type: string
                          minLength: 1
                          maxLength: 255
                          description: >-
                            The title of the stage. For course type stages it is
                            the course title.
                        grades:
                          type: array
                          items:
                            type: string
                            enum: *ref_4
                            description: The K-12 grade level associated with the stage.
                        subject:
                          $ref: '#/components/schemas/SubjectEnum'
                          description: The subject associated with the stage
                        type:
                          type: string
                          enum: *ref_5
                          description: The type of the stage
                        properties:
                          type: object
                          properties:
                            courseReferences:
                              type: array
                              items:
                                type: object
                                properties:
                                  courseId:
                                    type: string
                                  refAddedAt:
                                    type: string
                                    format: date-time
                                    pattern: Z$
                                required:
                                  - courseId
                                  - refAddedAt
                            testTypes:
                              type: array
                              items:
                                type: string
                                enum: *ref_6
                            learningAppId:
                              type: string
                              description: >-
                                Only for Hole-Filling stages. The id of the
                                learning app that should be used for the
                                hole-filling course.
                              examples: *ref_7
                          description: The additional properties associated with the stage
                      required:
                        - id
                        - title
                        - grades
                        - subject
                        - type
                        - properties
                required:
                  - stages
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: string
                required:
                  - message
              examples: *ref_3
  /powerpath/course-sequence/:id/stages/after/assessment:
    get:
      operationId: getCourseSequenceStageAfterAssessment
      summary: Get a stage after the assessment
      description: >-

        Get a single stage that comes after the specified assessment in a course
        sequence.

        ---

        Returns a stage (`CourseSequenceStage` object) that comes after the
        specified assessment in a course sequence.


        You specify assessment in query params like `test_grade=5`.

        There is a single assessment stage per grade, so this parameter

        is enough to identify the assessment stage after which you want to get
        the next stage.


        You can specify the test type too like `test_type=placement` or
        `test_type=test_out`.


        If you don't provide `test_type`, it will be considered as
        `end_of_grade`.

        ---

        **Special Input Cases**

        1. FastMath sequence

        For FastMath sequence you need to be cautious with `test_type` because
        this sequence contains

        Accuracy Assessment (test_out) and Fluency Assessment (end_of_course)
        for each grade.

        So if you omit this parameter in FastMath, you will get the stage after
        the Fluency Assessment of the specified grade.


        You need to provide `cqpm` (correct questions per minute) query
        parameter

        when `test_type` is `end_of_course` or omitted (default).

        This is because the FastMath sequence makes a progression decision based
        on both CQPM and score percentage.


        2. Language sequence

        This sequence has two assessments on the same grade (grade 0).

        When you want to know what is after the first assessment (`Grade K
        AlphaTest Assessment (Reading + Lang)`) -

        you can use the existing parameters.


        But when you want to know what is after the second assessment
        (`Literably ORD Assessment Level D`) -

        you need to provide `wcpm` (words correct per minute) query parameter.

        You get this from the `Literably ORD Assessment Level D` test results.


        If you don't do that the system won't be able to tell two assessments on
        the same grade apart and will return 

        the stage after the first assessment (`Grade K AlphaTest Assessment
        (Reading + Lang)`).
            
      tags:
        - PowerPath - Course Sequence
      parameters:
        - in: path
          name: id
          description: The unique identifier (UUID)
          schema:
            type: string
            format: uuid
            description: The unique identifier (UUID)
          required: true
        - in: query
          name: score_pct
          description: The test score (percent)
          schema:
            type: string
            description: The test score (percent)
            example: '90'
          required: true
        - in: query
          name: test_grade
          schema:
            type: string
            enum: *ref_4
          required: true
        - in: query
          name: test_type
          schema:
            type: string
            enum: *ref_6
        - in: query
          name: cqpm
          description: Correct Questions Per Minute for FastMath
          schema:
            type: string
            description: Correct Questions Per Minute for FastMath
        - in: query
          name: wcpm
          description: Word Count Per Minute for Language
          schema:
            type: string
            description: Word Count Per Minute for Language
      responses:
        '200':
          description: Course Sequence Stage
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: >-
                      The unique identifier of the stage. For course type stages
                      it is the course id.
                  title:
                    type: string
                    minLength: 1
                    maxLength: 255
                    description: >-
                      The title of the stage. For course type stages it is the
                      course title.
                  grades:
                    type: array
                    items:
                      type: string
                      enum: *ref_4
                      description: The K-12 grade level associated with the stage.
                  subject:
                    $ref: '#/components/schemas/SubjectEnum'
                    description: The subject associated with the stage
                  type:
                    type: string
                    enum: *ref_5
                    description: The type of the stage
                  properties:
                    type: object
                    properties:
                      courseReferences:
                        type: array
                        items:
                          type: object
                          properties:
                            courseId:
                              type: string
                            refAddedAt:
                              type: string
                              format: date-time
                              pattern: Z$
                          required:
                            - courseId
                            - refAddedAt
                      testTypes:
                        type: array
                        items:
                          type: string
                          enum: *ref_6
                      learningAppId:
                        type: string
                        description: >-
                          Only for Hole-Filling stages. The id of the learning
                          app that should be used for the hole-filling course.
                        examples: *ref_7
                    description: The additional properties associated with the stage
                required:
                  - id
                  - title
                  - grades
                  - subject
                  - type
                  - properties
        '204':
          description: End Of Sequence
          content:
            application/json:
              schema: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: string
                required:
                  - message
              examples: *ref_3
  /powerpath/course-sequence/:id/stages/after/course:
    get:
      operationId: getCourseSequenceStageAfterCourse
      summary: Get a stage after the course
      description: >-

        Get a single stage that comes after the specified course in a course
        sequence.

        ---

        Returns a stage (`CourseSequenceStage` object) that comes after the
        specified course in a course sequence.


        You need to provide the `course_id` of the course after which you want
        to get the next stage.


        You can also provide `grade`.


        This is not mandatory, but highly recommended, since the same course may
        appear in multiple grades.


        Example: eGummpp course with id `0493f468-e1dc-421f-bb5a-8de4a704e459`
        in the Language sequence is on grade 7 and grade 8.


        When you got 204 status code - it means the sequence is ended after the
        course you provided.
            
      tags:
        - PowerPath - Course Sequence
      parameters:
        - in: path
          name: id
          description: The unique identifier (UUID)
          schema:
            type: string
            format: uuid
            description: The unique identifier (UUID)
          required: true
        - in: query
          name: course_id
          schema:
            type: string
            minLength: 1
          required: true
        - in: query
          name: grade
          schema:
            type: string
            enum: *ref_4
      responses:
        '200':
          description: Course Sequence Stage
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: >-
                      The unique identifier of the stage. For course type stages
                      it is the course id.
                  title:
                    type: string
                    minLength: 1
                    maxLength: 255
                    description: >-
                      The title of the stage. For course type stages it is the
                      course title.
                  grades:
                    type: array
                    items:
                      type: string
                      enum: *ref_4
                      description: The K-12 grade level associated with the stage.
                  subject:
                    $ref: '#/components/schemas/SubjectEnum'
                    description: The subject associated with the stage
                  type:
                    type: string
                    enum: *ref_5
                    description: The type of the stage
                  properties:
                    type: object
                    properties:
                      courseReferences:
                        type: array
                        items:
                          type: object
                          properties:
                            courseId:
                              type: string
                            refAddedAt:
                              type: string
                              format: date-time
                              pattern: Z$
                          required:
                            - courseId
                            - refAddedAt
                      testTypes:
                        type: array
                        items:
                          type: string
                          enum: *ref_6
                      learningAppId:
                        type: string
                        description: >-
                          Only for Hole-Filling stages. The id of the learning
                          app that should be used for the hole-filling course.
                        examples: *ref_7
                    description: The additional properties associated with the stage
                required:
                  - id
                  - title
                  - grades
                  - subject
                  - type
                  - properties
        '204':
          description: End Of Sequence
          content:
            application/json:
              schema: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: string
                required:
                  - message
              examples: *ref_3
  /powerpath/course-sequence/active/stages/hole-filling/learning-app-id:
    get:
      operationId: getHoleFillingLearningAppIdOfActiveSequence
      summary: Get a hole-filling app id
      description: >-

        Get a learning app id of the hole-filling stage of the ACTIVE course
        sequence.

        ---

        A convenience endpoint that gives back the `learningAppId` of the
        hole-filling stage by the `grade` and the `subject`.


        You have to provide both params in query: like `?grade=5&subject=Math`.
            
      tags:
        - PowerPath - Course Sequence
      parameters:
        - in: query
          name: grade
          schema:
            type: string
            enum: *ref_4
          required: true
        - in: query
          name: subject
          schema:
            $ref: '#/components/schemas/SubjectEnum'
          required: true
      responses:
        '200':
          description: Learning App Id
          content:
            application/json:
              schema:
                type: object
                properties:
                  learningAppId:
                    type: string
                required:
                  - learningAppId
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: string
                required:
                  - message
              examples: *ref_3
  /powerpath/test-assignments:
    post:
      operationId: createTestAssignment
      summary: Create an individual test assignment (unlisted test-out)
      description: >-
        Creates a standalone test-out assignment for a student, generating a
        Resource and an unlisted ComponentResource (no course link), and
        registering the assignment record.
      tags:
        - PowerPath - Test Assignments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                student:
                  type: string
                  description: The sourcedId of the student
                subject:
                  type: string
                  description: The subject of the test (e.g., Math)
                  enum: &ref_10
                    - Reading
                    - Language
                    - Vocabulary
                    - Social Studies
                    - Writing
                    - Science
                    - FastMath
                    - Math
                    - None
                    - Other
                grade:
                  type: string
                  description: The grade of the test (e.g., 3)
                  enum: &ref_8
                    - '-1'
                    - '0'
                    - '1'
                    - '2'
                    - '3'
                    - '4'
                    - '5'
                    - '6'
                    - '7'
                    - '8'
                    - '9'
                    - '10'
                    - '11'
                    - '12'
                    - '13'
                testName:
                  type: string
                  description: Optional display name for the test
              required:
                - student
                - subject
                - grade
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  assignmentId:
                    type: string
                    description: The sourcedId of the test assignment
                  lessonId:
                    type: string
                    description: The sourcedId of the component resource (unlisted lesson)
                  resourceId:
                    type: string
                    description: The sourcedId of the resource created
                required:
                  - assignmentId
                  - lessonId
                  - resourceId
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
    get:
      operationId: listStudentTestAssignments
      summary: List test assignments for a student
      description: >-
        Returns a paginated list of test assignments filtered by student with
        optional filters for status, subject, and grade.
      tags:
        - PowerPath - Test Assignments
      parameters:
        - in: query
          name: limit
          description: >-
            The maximum number of items to return in the paginated response.
            While the OneRoster specification does not define a maximum limit,
            this implementation enforces a maximum of 3000 to prevent abuse and
            ensure optimal performance.
          schema:
            type: integer
            minimum: 1
            maximum: 3000
            default: 100
            description: >-
              The maximum number of items to return in the paginated response.
              While the OneRoster specification does not define a maximum limit,
              this implementation enforces a maximum of 3000 to prevent abuse
              and ensure optimal performance.
            example: 100
        - in: query
          name: offset
          description: The number of items to skip in the paginated response
          schema:
            type: integer
            minimum: 0
            default: 0
            description: The number of items to skip in the paginated response
            example: 0
        - in: query
          name: student
          description: The sourcedId of the student
          schema:
            type: string
            description: The sourcedId of the student
          required: true
        - in: query
          name: status
          schema:
            type: string
            enum: &ref_9
              - assigned
              - in_progress
              - completed
              - failed
              - expired
              - cancelled
        - in: query
          name: subject
          schema:
            type: string
        - in: query
          name: grade
          schema:
            type: string
            description: The grades of the course
            enum: *ref_8
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  testAssignments:
                    type: array
                    items:
                      type: object
                      properties:
                        sourcedId:
                          type: string
                        studentSourcedId:
                          type: string
                        studentEmail:
                          type: string
                          format: email
                        assignedByUserSourcedId:
                          type:
                            - string
                            - 'null'
                        subject:
                          type: string
                        grade:
                          type: string
                        assignmentStatus:
                          type: string
                        testName:
                          type:
                            - string
                            - 'null'
                        assignedAt:
                          type:
                            - string
                            - 'null'
                        expiresAt:
                          type:
                            - string
                            - 'null'
                        completedAt:
                          type:
                            - string
                            - 'null'
                        resourceSourcedId:
                          type:
                            - string
                            - 'null'
                        componentResourceSourcedId:
                          type:
                            - string
                            - 'null'
                      required:
                        - sourcedId
                        - studentSourcedId
                        - studentEmail
                        - assignedByUserSourcedId
                        - subject
                        - grade
                        - assignmentStatus
                  totalCount:
                    type: number
                  pageCount:
                    type: number
                  pageNumber:
                    type: number
                  offset:
                    type: number
                  limit:
                    type: number
                required:
                  - testAssignments
                  - totalCount
                  - pageCount
                  - pageNumber
                  - offset
                  - limit
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/test-assignments/{id}:
    delete:
      operationId: deleteTestAssignment
      summary: Delete a test assignment
      description: Soft deletes a test assignment by ID.
      tags:
        - PowerPath - Test Assignments
      parameters:
        - name: id
          description: Test assignment sourcedId
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Deleted
          content: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
    put:
      operationId: updateTestAssignment
      summary: Update a test assignment
      description: Updates the title of a test assignment.
      tags:
        - PowerPath - Test Assignments
      parameters:
        - name: id
          description: Test assignment sourcedId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                testName:
                  type: string
                  minLength: 1
              required:
                - testName
              additionalProperties: false
      responses:
        '204':
          description: Updated
          content: {}
        '400':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
    get:
      operationId: getTestAssignment
      summary: Get a test assignment
      description: Returns a single test assignment by its ID.
      tags:
        - PowerPath - Test Assignments
      parameters:
        - name: id
          description: Test assignment sourcedId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  sourcedId:
                    type: string
                  studentSourcedId:
                    type: string
                  studentEmail:
                    type: string
                    format: email
                  assignedByUserSourcedId:
                    type:
                      - string
                      - 'null'
                  subject:
                    type: string
                  grade:
                    type: string
                  assignmentStatus:
                    type: string
                  testName:
                    type:
                      - string
                      - 'null'
                  assignedAt:
                    type:
                      - string
                      - 'null'
                  expiresAt:
                    type:
                      - string
                      - 'null'
                  completedAt:
                    type:
                      - string
                      - 'null'
                  resourceSourcedId:
                    type:
                      - string
                      - 'null'
                  componentResourceSourcedId:
                    type:
                      - string
                      - 'null'
                required:
                  - sourcedId
                  - studentSourcedId
                  - studentEmail
                  - assignedByUserSourcedId
                  - subject
                  - grade
                  - assignmentStatus
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/test-assignments/admin:
    get:
      operationId: listAllTestAssignments
      summary: List all test assignments (admin)
      description: >-
        Returns a paginated list of test assignments across students. Optional
        filters for student, status, subject, grade.
      tags:
        - PowerPath - Test Assignments
      parameters:
        - in: query
          name: limit
          description: >-
            The maximum number of items to return in the paginated response.
            While the OneRoster specification does not define a maximum limit,
            this implementation enforces a maximum of 3000 to prevent abuse and
            ensure optimal performance.
          schema:
            type: integer
            minimum: 1
            maximum: 3000
            default: 100
            description: >-
              The maximum number of items to return in the paginated response.
              While the OneRoster specification does not define a maximum limit,
              this implementation enforces a maximum of 3000 to prevent abuse
              and ensure optimal performance.
            example: 100
        - in: query
          name: offset
          description: The number of items to skip in the paginated response
          schema:
            type: integer
            minimum: 0
            default: 0
            description: The number of items to skip in the paginated response
            example: 0
        - in: query
          name: student
          schema:
            type: string
            description: The sourcedId of the student
        - in: query
          name: status
          schema:
            type: string
            enum: *ref_9
        - in: query
          name: subject
          schema:
            type: string
        - in: query
          name: grade
          schema:
            type: string
            description: The grades of the course
            enum: *ref_8
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  testAssignments:
                    type: array
                    items:
                      type: object
                      properties:
                        sourcedId:
                          type: string
                        studentSourcedId:
                          type: string
                        studentEmail:
                          type: string
                          format: email
                        assignedByUserSourcedId:
                          type:
                            - string
                            - 'null'
                        subject:
                          type: string
                        grade:
                          type: string
                        assignmentStatus:
                          type: string
                        testName:
                          type:
                            - string
                            - 'null'
                        assignedAt:
                          type:
                            - string
                            - 'null'
                        expiresAt:
                          type:
                            - string
                            - 'null'
                        completedAt:
                          type:
                            - string
                            - 'null'
                        resourceSourcedId:
                          type:
                            - string
                            - 'null'
                        componentResourceSourcedId:
                          type:
                            - string
                            - 'null'
                      required:
                        - sourcedId
                        - studentSourcedId
                        - studentEmail
                        - assignedByUserSourcedId
                        - subject
                        - grade
                        - assignmentStatus
                  totalCount:
                    type: number
                  pageCount:
                    type: number
                  pageNumber:
                    type: number
                  offset:
                    type: number
                  limit:
                    type: number
                required:
                  - testAssignments
                  - totalCount
                  - pageCount
                  - pageNumber
                  - offset
                  - limit
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/test-assignments/bulk:
    post:
      operationId: createBulkTestAssignments
      summary: Create multiple test assignments
      description: >-
        Creates multiple standalone test-out assignments for students. Validates
        all items and reports all errors before processing. Returns 200 if all
        succeed, 400 if any validation errors are found. All-or-nothing
        operation.
      tags:
        - PowerPath - Test Assignments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      student:
                        type: string
                        description: The sourcedId of the student
                      subject:
                        type: string
                        description: The subject of the test (e.g., Math)
                        enum: *ref_10
                      grade:
                        type: string
                        description: The grade of the test (e.g., 3)
                        enum: *ref_8
                      testName:
                        type: string
                        description: Optional display name for the test
                    required:
                      - student
                      - subject
                      - grade
                  minItems: 1
                  description: Array of test assignments to create
              required:
                - items
              additionalProperties: false
      responses:
        '200':
          description: All assignments created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether all assignments were created successfully
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        assignmentId:
                          type: string
                          description: The sourcedId of the test assignment
                        lessonId:
                          type: string
                          description: >-
                            The sourcedId of the component resource (unlisted
                            lesson)
                        resourceId:
                          type: string
                          description: The sourcedId of the resource created
                      required:
                        - assignmentId
                        - lessonId
                        - resourceId
                    description: Array of successfully created test assignments
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        row:
                          type: number
                          description: Row number (0-based) where the error occurred
                        message:
                          type: string
                          description: Error message describing what went wrong
                      required:
                        - row
                        - message
                    description: Array of errors that occurred during processing
                required:
                  - success
                  - results
                  - errors
                additionalProperties: false
        '400':
          description: Validation errors found - no assignments created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether all assignments were created successfully
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        assignmentId:
                          type: string
                          description: The sourcedId of the test assignment
                        lessonId:
                          type: string
                          description: >-
                            The sourcedId of the component resource (unlisted
                            lesson)
                        resourceId:
                          type: string
                          description: The sourcedId of the resource created
                      required:
                        - assignmentId
                        - lessonId
                        - resourceId
                    description: Array of successfully created test assignments
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        row:
                          type: number
                          description: Row number (0-based) where the error occurred
                        message:
                          type: string
                          description: Error message describing what went wrong
                      required:
                        - row
                        - message
                    description: Array of errors that occurred during processing
                required:
                  - success
                  - results
                  - errors
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/test-assignments/import:
    post:
      operationId: importTestAssignments
      summary: Import test assignments from Google Sheets
      description: >-
        Fetches a public Google Sheet tab as CSV and creates test assignments in
        bulk. Requires columns: student, subject, grade (case-insensitive).
        Student may be email or ID. All-or-nothing; returns 200 if all succeed,
        400 if any errors.
      tags:
        - PowerPath - Test Assignments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                spreadsheetUrl:
                  type: string
                  format: uri
                  description: Publicly readable Google Sheets URL (Anyone with link)
                sheet:
                  type: string
                  description: The Sheet/tab name to read (case-sensitive in Sheets)
              required:
                - spreadsheetUrl
                - sheet
              additionalProperties: false
      responses:
        '200':
          description: All assignments created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether all assignments were created successfully
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        assignmentId:
                          type: string
                          description: The sourcedId of the test assignment
                        lessonId:
                          type: string
                          description: >-
                            The sourcedId of the component resource (unlisted
                            lesson)
                        resourceId:
                          type: string
                          description: The sourcedId of the resource created
                      required:
                        - assignmentId
                        - lessonId
                        - resourceId
                    description: Array of successfully created test assignments
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        row:
                          type: number
                          description: Row number (0-based) where the error occurred
                        message:
                          type: string
                          description: Error message describing what went wrong
                      required:
                        - row
                        - message
                    description: Array of errors that occurred during processing
                required:
                  - success
                  - results
                  - errors
                additionalProperties: false
        '400':
          description: Validation errors found - no assignments created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether all assignments were created successfully
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        assignmentId:
                          type: string
                          description: The sourcedId of the test assignment
                        lessonId:
                          type: string
                          description: >-
                            The sourcedId of the component resource (unlisted
                            lesson)
                        resourceId:
                          type: string
                          description: The sourcedId of the resource created
                      required:
                        - assignmentId
                        - lessonId
                        - resourceId
                    description: Array of successfully created test assignments
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        row:
                          type: number
                          description: Row number (0-based) where the error occurred
                        message:
                          type: string
                          description: Error message describing what went wrong
                      required:
                        - row
                        - message
                    description: Array of errors that occurred during processing
                required:
                  - success
                  - results
                  - errors
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/placement/getAllPlacementTests:
    get:
      operationId: getAllPlacementTests
      summary: Get all placement tests
      description: >

        Returns all placement tests for a subject, including available results
        for each.


        A 'Lesson' (placement test) in this context is a ComponentResource
        object which has a Resource object with metadata.lessonType =
        "placement" associated with it.
      tags:
        - PowerPath - Placement
      parameters:
        - in: query
          name: student
          description: The sourcedId of the student
          schema:
            type: string
            description: The sourcedId of the student
          required: true
        - in: query
          name: subject
          description: The subject name
          schema:
            type: string
            description: The subject name
            enum: *ref_10
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  placementTests:
                    type: array
                    items:
                      type: object
                      properties:
                        component_resources:
                          type: object
                        resources:
                          type: object
                        resources_metadata:
                          type: object
                        assessment_line_items:
                          type:
                            - object
                            - 'null'
                        assessment_results:
                          type:
                            - array
                            - 'null'
                          items:
                            type: object
                      required:
                        - component_resources
                        - resources
                        - resources_metadata
                        - assessment_line_items
                        - assessment_results
                required:
                  - placementTests
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/placement/getCurrentLevel:
    get:
      operationId: getCurrentLevel
      summary: Get current level
      description: >

        Returns the current level of the student in a placement process:

        - The level is determined by the last completed placement test's grade
        level, starting from the lowest grade level available for the subject's
        placement tests.

        - As the student completes placement tests and attains scores of 90 or
        greater, their level updates to the next level available for the
        subject.


        Also returns the 'onboarded' boolean that indicates if the student
        completed the onboarding process for the subject:

        - A 'onboarded = true' means they either completed and passed all
        placement tests or they have gotten a score smaller than 90 in the last
        completed placement test.

        - A 'onboarded = false' means they haven't completed placement tests yet
        or have achieved a score of 90 or greater in the last completed
        placement test and there are more tests to take.
      tags:
        - PowerPath - Placement
      parameters:
        - in: query
          name: student
          description: The sourcedId of the student
          schema:
            type: string
            description: The sourcedId of the student
          required: true
        - in: query
          name: subject
          description: The subject name
          schema:
            type: string
            description: The subject name
            enum: *ref_10
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  gradeLevel:
                    oneOf:
                      - allOf:
                          - $ref: '#/components/schemas/GradeEnum'
                        description: The grades of the course
                        enum: *ref_8
                      - type: 'null'
                    description: The grade level of the current level in the subject
                  onboarded:
                    type: boolean
                    description: >-
                      Whether the student has completed the onboarding process
                      for the subject
                  availableTests:
                    type: number
                    description: The number of placement tests available for the subject
                required:
                  - gradeLevel
                  - onboarded
                  - availableTests
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/placement/getNextPlacementTest:
    get:
      operationId: getNextPlacementTest
      summary: Get next placement test
      description: >

        Returns the next placement test for the student in a subject:

        - If the student has completed all placement tests for the subject, the
        next test's lesson ID will be null. Tests will also be marked as
        exhausted.

        - If the student hasn't completed a single placement test, returns the
        first placement test's lesson ID for the subject.

        - If the student has completed some placement tests, it will return null
        for the next test's lesson ID if the last completed test had a score
        smaller than 90.

        - Alternatively, it will return the next available placement test's
        lesson ID if the score was greater than or equal to 90.


        Also returns the 'onboarded' boolean that indicates if the student
        completed the onboarding process for the subject:

        - A 'onboarded = true' means they either completed and passed all
        placement tests or they have gotten a score smaller than 90 in the last
        completed placement test.

        - A 'onboarded = false' means they haven't completed placement tests yet
        or have achieved a score of 90 or greater in the last completed
        placement test and there are more tests to take.


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object with metadata.lessonType = "placement" associated with
        it.
      tags:
        - PowerPath - Placement
      parameters:
        - in: query
          name: student
          description: The sourcedId of the student
          schema:
            type: string
            description: The sourcedId of the student
          required: true
        - in: query
          name: subject
          description: The subject name
          schema:
            type: string
            description: The subject name
            enum: *ref_10
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  exhaustedTests:
                    type: boolean
                    description: Whether the student has exhausted all placement tests
                  gradeLevel:
                    oneOf:
                      - allOf:
                          - $ref: '#/components/schemas/GradeEnum'
                        description: The grades of the course
                        enum: *ref_8
                      - type: 'null'
                    description: The grade level of the next placement test
                  lesson:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The sourcedId of the next placement test
                      (ComponentResource)
                  onboarded:
                    type: boolean
                    description: >-
                      Whether the student has completed the onboarding process
                      for the subject
                  availableTests:
                    type: number
                    description: The number of placement tests available for the subject
                required:
                  - exhaustedTests
                  - gradeLevel
                  - lesson
                  - onboarded
                  - availableTests
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/placement/getSubjectProgress:
    get:
      operationId: getSubjectProgress
      summary: Get subject progress
      description: |

        Returns the progress the student has made in the given subject
      tags:
        - PowerPath - Placement
      parameters:
        - in: query
          name: student
          description: The sourcedId of the student
          schema:
            type: string
            description: The sourcedId of the student
          required: true
        - in: query
          name: subject
          description: The subject name
          schema:
            type: string
            description: The subject name
            enum: *ref_10
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  progress:
                    type: array
                    items:
                      type: object
                      properties:
                        course:
                          type: object
                          properties:
                            courseCode:
                              type:
                                - string
                                - 'null'
                            dateLastModified:
                              type: string
                            grades:
                              type:
                                - array
                                - 'null'
                              items:
                                allOf:
                                  - $ref: '#/components/schemas/GradeEnum'
                                description: The grades of the course
                                enum: *ref_8
                            level:
                              type:
                                - string
                                - 'null'
                            orgSourcedId:
                              type: string
                            sourcedId:
                              type: string
                            status:
                              type: string
                            subjects:
                              type:
                                - array
                                - 'null'
                              items:
                                allOf:
                                  - $ref: '#/components/schemas/SubjectEnum'
                                description: The subjects of the course
                                enum: *ref_10
                            title:
                              type: string
                          required:
                            - courseCode
                            - dateLastModified
                            - grades
                            - level
                            - orgSourcedId
                            - sourcedId
                            - status
                            - subjects
                            - title
                        inEnrolled:
                          type: boolean
                        hasUsedTestOut:
                          type: boolean
                          description: >-
                            Whether the student has a fully graded assessment
                            result for a test-out lesson in the course
                        testOutLessonId:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The sourcedId of the test-out lesson
                            (ComponentResource) in the course
                        completedLessons:
                          type: number
                          description: >-
                            The number of lessons that contain an assessment
                            result with a score status of 'fully graded'
                        totalLessons:
                          type: number
                          description: The total number of lessons in the course
                        totalAttainableXp:
                          type: number
                          description: >-
                            The total XP that can be earned by the student in
                            the course, not considering potential multipliers
                        totalXpEarned:
                          type: number
                          description: >-
                            The total XP earned by the student considering
                            calculated multipliers
                      required:
                        - course
                        - inEnrolled
                        - hasUsedTestOut
                        - testOutLessonId
                        - completedLessons
                        - totalLessons
                        - totalAttainableXp
                        - totalXpEarned
                      description: The overview of the course's progress
                    description: >-
                      The progress of the student in each of the subject's
                      courses
                required:
                  - progress
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/placement/resetUserPlacement:
    post:
      operationId: resetUserPlacement
      summary: Reset user placement for subject
      description: >

        Resets a user's placement progress for a specific subject by:

        - Soft deleting all placement assessment results for that subject

        - Resetting user onboarding state to "in_progress" and removing
        completedAt and courseId if existing


        This operation is restricted to administrators only and cannot be
        undone.
      tags:
        - PowerPath - Placement
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                student:
                  type: string
                  description: The sourcedId of the student
                subject:
                  type: string
                  description: The subject name
                  enum: *ref_10
              required:
                - student
                - subject
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the reset operation was successful
                  placementResultsDeleted:
                    type: number
                    description: Number of placement results soft-deleted
                  onboardingReset:
                    type: boolean
                    description: Whether onboarding state was reset
                required:
                  - success
                  - placementResultsDeleted
                  - onboardingReset
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/screening/results/{userId}:
    get:
      operationId: getResults
      summary: Get results
      description: Get results for a user
      tags:
        - PowerPath - Placement
      parameters:
        - name: userId
          description: User ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Results
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type:
                    - object
                    - 'null'
                  properties:
                    grade:
                      allOf:
                        - $ref: '#/components/schemas/GradeEnum'
                      description: The grades of the course
                      enum: *ref_8
                    ritScore:
                      type: number
                    testName:
                      type: string
                    completedAt:
                      type: string
                  required:
                    - grade
                    - ritScore
                    - testName
                    - completedAt
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/screening/session/{userId}:
    get:
      operationId: getSession
      summary: Get session
      description: Get session for a user
      tags:
        - PowerPath - Placement
      parameters:
        - name: userId
          description: User ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Session
          content:
            application/json:
              schema:
                type: object
                properties:
                  nweaStudentId:
                    type: string
                    format: uuid
                  createdOn:
                    type: string
                    format: date-time
                  password:
                    type: string
                  name:
                    type: string
                  proctorId:
                    type: string
                    format: uuid
                  pin:
                    type: string
                  testSessionId:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum: &ref_11
                      - active
                      - inactive
                  assignment:
                    type: object
                    properties:
                      assignedTestKey:
                        type:
                          - string
                          - 'null'
                      status:
                        type:
                          - string
                          - 'null'
                        enum:
                          - enqueued
                          - assigned
                          - in_progress
                          - blocked
                          - completed
                          - abandoned
                          - failed
                          - null
                      nweaStatus:
                        type:
                          - string
                          - 'null'
                        enum:
                          - ENQUEUED
                          - AWAITING_STUDENT
                          - IN_PROGRESS
                          - PAUSED
                          - SUSPENDED
                          - TERMINATED
                          - ABANDONED
                          - COMPLETED
                          - FAILED
                          - null
                    required:
                      - assignedTestKey
                      - status
                      - nweaStatus
                  termId:
                    type: string
                required:
                  - nweaStudentId
                  - createdOn
                  - password
                  - name
                  - proctorId
                  - pin
                  - testSessionId
                  - status
                  - assignment
                  - termId
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/screening/session/reset:
    post:
      operationId: resetSession
      summary: Reset session
      description: Reset session for a user
      tags:
        - PowerPath - Placement
      parameters:
        - name: userId
          description: User ID
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: string
              required:
                - userId
      responses:
        '204':
          description: Session reset
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/screening/tests/assign:
    post:
      operationId: assignTest
      summary: Assign test
      description: Assign test to a user
      tags:
        - PowerPath - Placement
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: string
                subject:
                  type: string
                  enum:
                    - Math
                    - Reading
                    - Language
                    - Science
              required:
                - userId
                - subject
      responses:
        '200':
          description: Test assigned
          content:
            application/json:
              schema:
                type: object
                properties:
                  nweaStudentId:
                    type: string
                    format: uuid
                  createdOn:
                    type: string
                    format: date-time
                  password:
                    type: string
                  name:
                    type: string
                  proctorId:
                    type: string
                    format: uuid
                  pin:
                    type: string
                  testSessionId:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum: *ref_11
                  assignment:
                    type: object
                    properties:
                      assignedTestKey:
                        type:
                          - string
                          - 'null'
                      status:
                        type:
                          - string
                          - 'null'
                        enum:
                          - enqueued
                          - assigned
                          - in_progress
                          - blocked
                          - completed
                          - abandoned
                          - failed
                          - null
                      nweaStatus:
                        type:
                          - string
                          - 'null'
                        enum:
                          - ENQUEUED
                          - AWAITING_STUDENT
                          - IN_PROGRESS
                          - PAUSED
                          - SUSPENDED
                          - TERMINATED
                          - ABANDONED
                          - COMPLETED
                          - FAILED
                          - null
                    required:
                      - assignedTestKey
                      - status
                      - nweaStatus
                  termId:
                    type: string
                required:
                  - nweaStudentId
                  - createdOn
                  - password
                  - name
                  - proctorId
                  - pin
                  - testSessionId
                  - status
                  - assignment
                  - termId
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/createExternalPlacementTest:
    post:
      operationId: createExternalPlacementTest
      summary: Create an External Placement Test
      description: >

        Creates or updates a ComponentResource to act as a Placement Test lesson
        in a course.

        This allows integrating with external test-taking platforms (like
        Edulastic) for content delivery.


        The endpoint creates or updates (if they already exist) the following
        entities:

        - A CourseComponent for the course to hold the Placement Test lesson

        - A Resource with lessonType = "placement" and the external service
        details as metadata

        - A ComponentResource acting as the Placement Test lesson


        A test assignment is mandatory in order to obtain access credentials for
        this test on the external platform, as well as to obtain the IDs
        necessary for fetching test results later on:

        - For test assignments, use the "makeExternalTestAssignment" endpoint.

        - For test results retrieval, use the
        "importExternalTestAssignmentResults" endpoint.


        If a 'courseIdOnFail' parameter is supplied, its Course's sourcedId will
        be used to automatically enroll the student when the placement test is
        completed with a score below 90 %. When the parameter is omitted (or set
        to null), no automatic enrollment will happen.


        This request fails if:

        - The 'course' provided does not exist, or a non-null 'courseIdOnFail'
        references a non-existent course

        - An existing Placement Test lesson in the course, targeting the same
        grade, has a different toolProvider than the one provided (need to
        perform an update to the Resource first, altering the "toolProvider",
        before trying again)


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object with lessonType = "placement" associated with it.
      tags:
        - PowerPath - Course Mastery
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CreateExternalTestOutInput'
                - $ref: '#/components/schemas/CreateExternalPlacementInput'
              discriminator:
                propertyName: lessonType
                mapping:
                  test-out: '#/components/schemas/CreateExternalTestOutInput'
                  placement: '#/components/schemas/CreateExternalPlacementInput'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonType:
                    type: string
                    enum:
                      - powerpath-100
                      - quiz
                      - test-out
                      - placement
                      - unit-test
                      - alpha-read-article
                  lessonId:
                    type: string
                    description: >-
                      The sourcedId of the created external test reference
                      (ComponentResource)
                  courseComponentId:
                    type: string
                    description: The sourcedId of the component (unit) containing the test
                  resourceId:
                    type: string
                    description: >-
                      The sourcedId of the resource representing the external
                      test
                  launchUrl:
                    type: string
                    description: The URL to the external test system
                  toolProvider:
                    type: string
                    description: The tool provider id
                  vendorId:
                    type: string
                    description: The ID of the test in the spreadsheet
                  courseIdOnFail:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The courseId to enroll the student in if they fail the
                      placement test (optional)
                  grades:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/GradeEnum'
                      description: The grades of the course
                      enum: *ref_8
                    description: The grades for the resource
                required:
                  - lessonType
                  - lessonId
                  - courseComponentId
                  - resourceId
                  - toolProvider
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/createExternalTestOut:
    post:
      operationId: createExternalTestOut
      summary: Create an External TestOut
      description: >

        Creates or updates a ComponentResource to act as a TestOut lesson in a
        course.

        This allows integrating with external test-taking platforms (like
        Edulastic) for content delivery.


        The endpoint creates or updates (if they already exist) the following
        entities:

        - A CourseComponent for the course to hold the TestOut lesson

        - A Resource with lessonType = "test-out" and the external service
        details as metadata

        - A ComponentResource acting as the TestOut lesson


        A test assignment is mandatory in order to obtain access credentials for
        this test on the external platform, as well as to obtain the IDs
        necessary for fetching test results later on:

        - For test assignments, use the "makeExternalTestAssignment" endpoint.

        - For test results retrieval, use the
        "importExternalTestAssignmentResults" endpoint.


        This request fails if:

        - The course provided does not exist

        - An existing TestOut lesson in the course has a different toolProvider
        than the one provided (need to perform an update to the Resource first,
        altering the "toolProvider", before trying again)


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object with lessonType = "test-out" associated with it.
      tags:
        - PowerPath - Course Mastery
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CreateExternalTestOutInput'
                - $ref: '#/components/schemas/CreateExternalPlacementInput'
              discriminator:
                propertyName: lessonType
                mapping:
                  test-out: '#/components/schemas/CreateExternalTestOutInput'
                  placement: '#/components/schemas/CreateExternalPlacementInput'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonType:
                    type: string
                    enum:
                      - powerpath-100
                      - quiz
                      - test-out
                      - placement
                      - unit-test
                      - alpha-read-article
                  lessonId:
                    type: string
                    description: >-
                      The sourcedId of the created external test reference
                      (ComponentResource)
                  courseComponentId:
                    type: string
                    description: The sourcedId of the component (unit) containing the test
                  resourceId:
                    type: string
                    description: >-
                      The sourcedId of the resource representing the external
                      test
                  launchUrl:
                    type: string
                    description: The URL to the external test system
                  toolProvider:
                    type: string
                    description: The tool provider id
                  vendorId:
                    type: string
                    description: The ID of the test in the spreadsheet
                  courseIdOnFail:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The courseId to enroll the student in if they fail the
                      placement test (optional)
                  grades:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/GradeEnum'
                      description: The grades of the course
                      enum: *ref_8
                    description: The grades for the resource
                required:
                  - lessonType
                  - lessonId
                  - courseComponentId
                  - resourceId
                  - toolProvider
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/createInternalTest:
    post:
      operationId: createInternalTest
      summary: Create an Internal Test
      description: >

        Creates or updates a ComponentResource to act as an internal test lesson
        in a course.

        This allows creating tests using internal QTI resources or assessment
        banks with multiple QTI resources.


        The endpoint creates or updates (if they already exist) the following
        entities:

        - A CourseComponent for the course to hold the test lesson

        - One or more Resources with type = "qti" for individual tests, or type
        = "assessment-bank" for test banks

        - A ComponentResource acting as the test lesson


        Supports two test types:

        - Regular QTI test: Creates a single QTI resource

        - Assessment Bank: Creates multiple QTI resources and wraps them in an
        assessment bank


        For test-out and placement lessons, this will update existing tests of
        the same type.

        For other lesson types (quiz, unit-test, pp-100), it will create new
        lessons in the course structure.


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object associated with it.
      tags:
        - PowerPath - Course Mastery
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CreateInternalQtiTestInput'
                - $ref: '#/components/schemas/CreateInternalAssessmentBankInput'
              discriminator:
                propertyName: testType
                mapping:
                  qti: '#/components/schemas/CreateInternalQtiTestInput'
                  assessment-bank: '#/components/schemas/CreateInternalAssessmentBankInput'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonType:
                    type: string
                    enum:
                      - powerpath-100
                      - quiz
                      - test-out
                      - placement
                      - unit-test
                      - alpha-read-article
                  testType:
                    type: string
                    enum:
                      - qti
                      - assessment-bank
                  lessonId:
                    type: string
                    description: >-
                      The sourcedId of the created internal test lesson
                      (ComponentResource)
                  courseComponentId:
                    type: string
                    description: The sourcedId of the component (unit) containing the test
                  resourceId:
                    type: string
                    description: >-
                      The sourcedId of the main resource (parent for
                      assessment-bank)
                  childResourceIds:
                    type: array
                    items:
                      type: string
                    description: >-
                      Array of child resource IDs (only for assessment-bank
                      type)
                  courseIdOnFail:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The courseId to enroll the student in if they fail the
                      placement test (optional)
                  grades:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/GradeEnum'
                      description: The grades of the course
                      enum: *ref_8
                    description: The grades for the resource (for placement tests)
                required:
                  - lessonType
                  - testType
                  - lessonId
                  - courseComponentId
                  - resourceId
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/importExternalTestAssignmentResults:
    get:
      operationId: importExternalTestAssignmentResults
      summary: Import external test assignment results
      description: >

        Retrieves and stores the results of the external test assignment:

        - Applies to 'test-out', 'placement', and 'unit-test' lessons.


        This logic changes depending on the stored "toolProvider" of the lesson:

        - For "edulastic":
          - If the lesson is already finalized, no data import is performed.
          - If the lesson is not finalized, this will start populating the test and question results with available data, including question scores and feedback. The test will then be deemed finalized when all questions have been answered and the test grade is "GRADED".
        - For "mastery-track":
          - If the lesson is already finalized, no data import is performed.
          - If the lesson is not finalized and powerpath detects the write-back of results was done, this will process the available test and question results data, including question scores and feedback. The test will then be deemed finalized when the scoreStatus is "fully graded" and the masteryTrackProcessed flag is set to 'true'.

        Will fail if:

        - The lesson is not an external "test-out", "placement", or "unit-test",
        or the student does not exist

        - Credentials for data consumption are not available in the test result
        of this student (meaning a previous test assignment was not made)

        - Any other problem on the Edulastic or MasteryTrack API being used that
        may happen


        The actual test results can be retrieved by using the
        "getAssessmentProgress" endpoint.


        Notice this may perform a course enrollment for the student if the
        lesson is a placement test or test-out, and the respective subject and
        grade are mapped to the Subject Track with a valid course set. The
        enrollemnt can be skipped by setting the "skipCourseEnrollment" flag in
        the makeExternalTestAssignment request.


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object with lessonType = "test-out", "placement", or
        "unit-test" associated with it.
      tags:
        - PowerPath - Course Mastery
      parameters:
        - in: query
          name: student
          description: The sourcedId of the student
          schema:
            type: string
            description: The sourcedId of the student
          required: true
        - in: query
          name: lesson
          description: The sourcedId of the lesson (ComponentResource)
          schema:
            type: string
            description: The sourcedId of the lesson (ComponentResource)
          required: true
        - in: query
          name: applicationName
          description: The name of the application
          schema:
            type: string
            description: The name of the application
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonType:
                    type: string
                    enum: &ref_12
                      - test-out
                      - placement
                      - unit-test
                  lessonId:
                    type:
                      - string
                      - 'null'
                    description: The sourcedId of the lesson (ComponentResource)
                  toolProvider:
                    type:
                      - string
                      - 'null'
                    description: The tool provider for the lesson (ComponentResource)
                  finalized:
                    type: boolean
                    description: Whether the Test has been finalized in the current attempt
                  attempt:
                    type: number
                    description: The attempt number
                  credentials:
                    type: object
                    properties:
                      email:
                        type: string
                        format: email
                      password:
                        type: string
                    required:
                      - email
                      - password
                    description: >-
                      The credentials for accessing the assigned test on
                      external tool
                  assignmentId:
                    type: string
                    description: >-
                      The id of the assignment on external tool for results
                      retrieval
                  classId:
                    type: string
                    description: >-
                      The id of the class on external tool for results retrieval
                      (may be empty for some tools)
                  testUrl:
                    type: string
                    format: uri
                    description: The URL of the test on external tool
                  testId:
                    type: string
                    description: >-
                      The id of the test on external tool (may be assignment ID
                      for some tools)
                required:
                  - lessonType
                  - lessonId
                  - toolProvider
                  - finalized
                  - attempt
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/makeExternalTestAssignment:
    post:
      operationId: makeExternalTestAssignment
      summary: Make external test assignment
      description: >

        Makes an external test assignment for the given student:

        - Applies to 'test-out', 'placement', and 'unit-test' lessons.


        This logic changes depending on the provided "toolProvider" value:

        - For "edulastic":
          - Authenticates the student with their email on Edulastic
          - Assigns the test to the student in Edulastic
          - Stores the received "assignmentId" and "classId" in the lesson's AssessmentResult
          - Returns the test link, credentials, and IDs of the test for later results consumption
        - For "mastery-track":
          - Authenticates the student with their email on MasteryTrack
          - Assigns the test to the student in MasteryTrack (using the testId in the request or subject+grade from the lesson's Resource metadata)
          - Stores the received "assignmentId" in the lesson's AssessmentResult
          - Returns the test link, credentials, and IDs of the test
          - Waits for a test result write-back to be performed by the MasteryTrack on test end

        Will fail if:

        - The lesson is not an external "test-out", "placement", or "unit-test",
        or the student does not exist

        - External tool (described in the resource.metadata.toolProvider) is not
        "edulastic" or "mastery-track"

        - Any other problem on the Edulastic or MasteryTrack API being used that
        may happen


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object with lessonType = "test-out", "placement", or
        "unit-test" associated with it.
      tags:
        - PowerPath - Course Mastery
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                student:
                  type: string
                  description: The sourcedId of the student
                lesson:
                  type: string
                  description: The sourcedId of the lesson (ComponentResource)
                applicationName:
                  type: string
                  description: >-
                    The name of the application to use for authenticating on the
                    external tool
                testId:
                  type: string
                  description: >-
                    The specific test ID to assign for MasteryTrack tool
                    provider. If provided, overrides subject+grade selection.
                skipCourseEnrollment:
                  type: boolean
                  description: >-
                    When true, skips automatic course enrollment after test
                    completion. Only applies to the current attempt.
              required:
                - student
                - lesson
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  toolProvider:
                    type: string
                    enum:
                      - AlphaTest
                      - edulastic
                      - mastery-track
                  lessonType:
                    type: string
                    enum: *ref_12
                  attempt:
                    type: number
                    description: The attempt number
                  credentials:
                    type: object
                    properties:
                      email:
                        type: string
                        format: email
                      password:
                        type: string
                    required:
                      - email
                      - password
                    description: >-
                      The credentials for accessing the assigned test on
                      external tool
                  assignmentId:
                    type: string
                    description: >-
                      The id of the assignment on external tool for results
                      retrieval
                  classId:
                    type: string
                    description: >-
                      The id of the class on external tool for results retrieval
                      (may be empty for some tools)
                  testUrl:
                    type: string
                    format: uri
                    description: The URL of the test on external tool
                  testId:
                    type: string
                    description: >-
                      The id of the test on external tool (may be assignment ID
                      for some tools)
                required:
                  - toolProvider
                  - lessonType
                  - attempt
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/testOut:
    get:
      operationId: testOut
      summary: Test out
      description: >

        Returns the testOut lesson reference for the given student and course.


        - TestOut is a lesson that represents the end-of-course test, covering
        the entire course content.

        - The testOut should be specified by a Resource with metadata.lessonType
        = "test-out".


        Details:

        - Returns a null lessonId in case no Resource with metadata.lessonType =
        "test-out" is found in the course.

        - In case student has already taken the TestOut, this will return the
        "finalized" flag set to true.

        - In case this is an external TestOut, also return external access
        credentials, if available (i.e. test was previously assigned to
        student).


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object with metadata.lessonType = "test-out" associated with
        it.
      tags:
        - PowerPath - Course Mastery
      parameters:
        - in: query
          name: student
          description: The sourcedId of the student to retrieve the testOut for
          schema:
            type: string
            description: The sourcedId of the student to retrieve the testOut for
          required: true
        - in: query
          name: course
          description: The sourcedId of the Course to retrieve the testOut from
          schema:
            type: string
            description: The sourcedId of the Course to retrieve the testOut from
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestOutResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/lessonPlans/:
    post:
      operationId: createLessonPlan
      summary: Create a lesson plan
      description: |-
        Purpose: Create a new lesson plan for a course and student

        When to use:
        - When a new student is enrolled in a course
        - For initial setup of a student's learning path
        - When you need to create a lesson plan from scratch

        What it does:
        - Creates a new lesson plan
        - Associates it with the course and student
        - Optionally, associates it with a class
        - Returns the lesson plan ID
        - If the lesson plan already exists, returns the existing lesson plan ID
        - If the course, user or class is not found, returns a 404 error
            
      tags:
        - PowerPath - Lesson Plans
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                courseId:
                  type: string
                  description: The Sourced ID of the course
                userId:
                  type: string
                  description: The Sourced ID of the student
                classId:
                  type: string
                  description: >-
                    (optional) The Sourced ID of the class. Defaults to current
                    year's class for the student
              required:
                - courseId
                - userId
      responses:
        '200':
          description: Lesson plan already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonPlanId:
                    type: string
                required:
                  - lessonPlanId
        '201':
          description: Lesson plan created
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonPlanId:
                    type: string
                required:
                  - lessonPlanId
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Course, User or Class not found
  /powerpath/lessonPlans/{courseId}/{userId}:
    get:
      operationId: getTree
      summary: Returns the lesson plan tree for a course and student
      description: >-

        Given a course sourced ID and a user sourced ID, returns the lesson plan
        tree.


        The lesson plan tree is nested object comprised of several
        lessonPlanItems, 

        which are nodes that contain information about the lesson plan -
        including which component or component resource is associated with that
        node, 

        as well as which node is its parent.


        A node may reference a component or a componentResource.

        A node with no parent is considered at the root level of the lesson plan
        tree.


        A student's lesson plan has a unique ID that can be used instead of the
        parameters to retrieve it.
            
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: courseId
          description: Course Sourced ID
          in: path
          required: true
          schema:
            type: string
        - name: userId
          description: User Sourced ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonPlan:
                    type: object
                    properties:
                      lessonPlan:
                        type: object
                        properties:
                          course:
                            type: object
                            properties:
                              sourcedId:
                                type: string
                                minLength: 1
                              status:
                                type: string
                                enum: &ref_14
                                  - active
                                  - tobedeleted
                              dateLastModified:
                                type: string
                                format: date-time
                              metadata:
                                type: object
                                additionalProperties: true
                                nullable: true
                                description: Additional metadata for the object
                              title:
                                type: string
                              academicSession:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  sourcedId:
                                    type: string
                                required:
                                  - sourcedId
                              schoolYear:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  href:
                                    type: string
                                    format: uri
                                  sourcedId:
                                    type: string
                                  type:
                                    type: string
                                    enum: &ref_13
                                      - academicSession
                                      - assessmentLineItem
                                      - category
                                      - class
                                      - course
                                      - demographics
                                      - enrollment
                                      - gradingPeriod
                                      - lineItem
                                      - org
                                      - resource
                                      - result
                                      - scoreScale
                                      - student
                                      - teacher
                                      - term
                                      - user
                                      - componentResource
                                      - courseComponent
                                required:
                                  - href
                                  - sourcedId
                                  - type
                              courseCode:
                                type:
                                  - string
                                  - 'null'
                              grades:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  allOf:
                                    - $ref: '#/components/schemas/GradeEnum'
                                  description: The grades of the course
                                  enum: *ref_8
                              subjects:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  allOf:
                                    - $ref: '#/components/schemas/SubjectEnum'
                                  description: The subjects of the course
                                  enum: *ref_10
                              subjectCodes:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  type: string
                              org:
                                type: object
                                properties:
                                  sourcedId:
                                    type: string
                                required:
                                  - sourcedId
                              level:
                                type:
                                  - string
                                  - 'null'
                              gradingScheme:
                                type:
                                  - string
                                  - 'null'
                              resources:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  type: object
                                  properties:
                                    href:
                                      type: string
                                      format: uri
                                    sourcedId:
                                      type: string
                                    type:
                                      type: string
                                      enum: *ref_13
                                  required:
                                    - href
                                    - sourcedId
                                    - type
                            required:
                              - status
                              - title
                              - org
                            description: Represents a course.
                          subComponents:
                            type: array
                            items:
                              $ref: '#/components/schemas/LessonPlanTreeComponent'
                        required:
                          - course
                          - subComponents
                    required:
                      - lessonPlan
                required:
                  - lessonPlan
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Lesson Plan not found
  /powerpath/lessonPlans/{courseId}/deleteAll:
    delete:
      operationId: deleteLessonPlansByCourseId
      summary: Delete all lesson plans for a course
      description: |2-

            Deletes all lesson plans for a course by its ID.
            
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: courseId
          description: Course ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Lesson Plans deleted
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Course not found
  /powerpath/lessonPlans/{lessonPlanId}/operations:
    post:
      operationId: storeOperation
      summary: Store an operation on a lesson plan
      description: >-
        Purpose: Store a new operation in the lesson plan's operation log


        When to use:

        - Primary endpoint for all lesson plan modifications

        - When students, guides or admins want to customize the learning path

        - For any personalization changes


        Available Operations:


        - set-skipped: Show/hide content for the student

        - move-item-before/after: Reorder content relative to other items

        - move-item-to-start/end: Move to beginning/end of parent

        - add-custom-resource: Add additional resources in the lesson plan

        - change-item-parent: Move content to different sections (components) in
        the lesson plan

          
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: lessonPlanId
          description: Lesson plan ID
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                operation:
                  oneOf:
                    - $ref: '#/components/schemas/SetSkippedCommand'
                    - $ref: '#/components/schemas/AddCustomResourceCommand'
                    - $ref: '#/components/schemas/MoveItemBeforeCommand'
                    - $ref: '#/components/schemas/MoveItemAfterCommand'
                    - $ref: '#/components/schemas/MoveItemToStartCommand'
                    - $ref: '#/components/schemas/MoveItemToEndCommand'
                    - $ref: '#/components/schemas/ChangeItemParentCommand'
                  discriminator:
                    propertyName: type
                    mapping:
                      set-skipped: '#/components/schemas/SetSkippedCommand'
                      add-custom-resource: '#/components/schemas/AddCustomResourceCommand'
                      move-item-before: '#/components/schemas/MoveItemBeforeCommand'
                      move-item-after: '#/components/schemas/MoveItemAfterCommand'
                      move-item-to-start: '#/components/schemas/MoveItemToStartCommand'
                      move-item-to-end: '#/components/schemas/MoveItemToEndCommand'
                      change-item-parent: '#/components/schemas/ChangeItemParentCommand'
                reason:
                  type: string
                  description: The reason for the operation
              required:
                - operation
              additionalProperties: false
      responses:
        '201':
          description: Operation stored
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  operationId:
                    type: string
                required:
                  - success
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
    get:
      operationId: getOperations
      summary: Get the operations for a lesson plan
      description: |-
        Purpose: Get all operations for a lesson plan

        When to use:
        - For audit trails and history tracking
        - When debugging lesson plan issues
        - For administrative oversight

        What it does:
        - Returns all operations in chronological order
        - Includes operation type, payload, timestamp, and reason
        - Shows who made each change and when
          
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: lessonPlanId
          description: Lesson plan ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Operations
          content:
            application/json:
              schema:
                type: object
                properties:
                  operations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        payload: {}
                        reason:
                          type:
                            - string
                            - 'null'
                        createdAt:
                          type: string
                        sequenceNumber:
                          type: number
                        createdBy:
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - type
                        - reason
                        - createdAt
                        - sequenceNumber
                        - createdBy
                required:
                  - operations
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
  /powerpath/lessonPlans/{lessonPlanId}/operations/sync:
    post:
      operationId: syncOperations
      summary: Sync the operations for a lesson plan
      description: >-
        Purpose: Apply pending operations to update the lesson plan


        When to use:

        - After storing operations, to see the changes take effect

        - For incremental updates without full recreation

        - When you want to apply only recent changes (e.g after running a script
        to add a lot of operations)


        What it does:

        - Finds operations that haven't been applied yet

        - Executes them in sequence

        - Updates the lesson plan structure

        - Returns results of each operation
          
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: lessonPlanId
          description: Lesson plan ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Operations synced
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  operationCount:
                    type: number
                  operationResults:
                    type: array
                    items:
                      type: object
                      properties:
                        success:
                          type: boolean
                        errors:
                          type: array
                          items:
                            type: object
                            properties:
                              message:
                                type: string
                            required:
                              - message
                      required:
                        - success
                required:
                  - success
                  - operationCount
                  - operationResults
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
  /powerpath/lessonPlans/{lessonPlanId}/recreate:
    post:
      operationId: recreateLessonPlan
      summary: Recreate a lesson plan from a course and apply all operations
      description: |
        Purpose: Recreate a lesson plan from scratch using it's operation log

        When to use:
        - When a lesson plan becomes corrupted or out of sync
        - For testing or debugging purposes
        - After detecting and correcting inconsistencies

        What it does:
        - Deletes all current lesson plan items
        - Rebuilds from the base course structure
        - Applies all operations from the operation log in sequence
        - Returns the operation results for monitoring and inspection
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: lessonPlanId
          description: Lesson plan ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Lesson plan recreated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  operationCount:
                    type: number
                  operationResults:
                    type: array
                    items:
                      type: object
                      properties:
                        success:
                          type: boolean
                        errors:
                          type: array
                          items:
                            type: object
                            properties:
                              message:
                                type: string
                            required:
                              - message
                      required:
                        - success
                required:
                  - success
                  - operationCount
                  - operationResults
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
  /powerpath/lessonPlans/course/{courseId}/sync:
    post:
      operationId: SyncCourseLessonPlans
      summary: Sync Lesson Plans for a Course
      description: |-
        Purpose: Bulk synchronization of all lesson plans for a course.

        When to use:
        - After making significant structural changes to a base course
        - When you need to ensure all students have the latest course content

        What it does:

        - Finds all lesson plans associated with the course
        - Recreates each lesson plan from the base course structure
        - Applies all historical operations to maintain personalizations
        - Return a list of affected lesson plan ID's 

          
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: courseId
          description: Course ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Course synced
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonPlansAffected:
                    type: array
                    items:
                      type: string
                required:
                  - lessonPlansAffected
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
  /powerpath/lessonPlans/getCourseProgress/{courseId}/student/{studentId}:
    get:
      operationId: getCourseProgress
      summary: Get course progress
      description: >-

        Get the course progress for a student in a course.


        ---


        Returns a list of **assessment line items** for the **course** and
        **student**.


        A type "**component**" indicates a component of the lesson plan such as
        a unit or lesson.


        A type "**resource**" indicates a resource such as a video, audio,

        or document file as well as a quiz or question.


        Each **line item** contains a list of assessment results in the
        **results** attribute, related to student and course.


        **Filtering by Lesson**


        You can optionally filter the results to only include line items for a
        specific lesson by providing the `lessonId` query parameter with the
        component resource ID.
            
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: courseId
          description: Course ID
          in: path
          required: true
          schema:
            type: string
        - name: studentId
          description: Student ID
          in: path
          required: true
          schema:
            type: string
        - in: query
          name: lessonId
          description: >-
            Optional component resource ID to filter results by a specific
            lesson
          schema:
            type: string
            minLength: 1
            description: >-
              Optional component resource ID to filter results by a specific
              lesson
            example: lesson-123
      responses:
        '200':
          description: Course progress
          content:
            application/json:
              schema:
                type: object
                properties:
                  lineItems:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              const: component
                            assessmentLineItemSourcedId:
                              type: string
                            courseComponentSourcedId:
                              type: string
                            title:
                              type: string
                            results:
                              type: array
                              items:
                                type: object
                                properties:
                                  sourcedId:
                                    type: string
                                    minLength: 1
                                  status:
                                    type: string
                                    enum: *ref_14
                                  dateLastModified:
                                    type: string
                                    format: date-time
                                  metadata:
                                    type: object
                                    additionalProperties: true
                                    nullable: true
                                    description: Additional metadata for the object
                                  score:
                                    type:
                                      - number
                                      - 'null'
                                  textScore:
                                    type:
                                      - string
                                      - 'null'
                                  scoreDate:
                                    type: string
                                    format: date-time
                                  scoreScale:
                                    type:
                                      - object
                                      - 'null'
                                    properties:
                                      sourcedId:
                                        type: string
                                    required:
                                      - sourcedId
                                  scorePercentile:
                                    type:
                                      - number
                                      - 'null'
                                  scoreStatus:
                                    type: string
                                    enum: &ref_15
                                      - exempt
                                      - fully graded
                                      - not submitted
                                      - partially graded
                                      - submitted
                                  comment:
                                    type:
                                      - string
                                      - 'null'
                                  learningObjectiveSet:
                                    type:
                                      - array
                                      - 'null'
                                    items:
                                      type: object
                                      properties:
                                        source:
                                          type: string
                                        learningObjectiveResults:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              learningObjectiveId:
                                                type: string
                                              score:
                                                type: number
                                              textScore:
                                                type: string
                                            required:
                                              - learningObjectiveId
                                      required:
                                        - source
                                        - learningObjectiveResults
                                  inProgress:
                                    type:
                                      - string
                                      - 'null'
                                  incomplete:
                                    type:
                                      - string
                                      - 'null'
                                  late:
                                    type:
                                      - string
                                      - 'null'
                                  missing:
                                    type:
                                      - string
                                      - 'null'
                                required:
                                  - status
                                  - scoreDate
                                  - scoreStatus
                                description: Represents an assessment result.
                              description: Assessment results for the component and student
                          required:
                            - type
                            - assessmentLineItemSourcedId
                            - courseComponentSourcedId
                            - title
                            - results
                        - type: object
                          properties:
                            type:
                              type: string
                              const: resource
                            assessmentLineItemSourcedId:
                              type: string
                            courseComponentResourceSourcedId:
                              type: string
                            title:
                              type: string
                            results:
                              type: array
                              items:
                                type: object
                                properties:
                                  sourcedId:
                                    type: string
                                    minLength: 1
                                  status:
                                    type: string
                                    enum: *ref_14
                                  dateLastModified:
                                    type: string
                                    format: date-time
                                  metadata:
                                    type: object
                                    additionalProperties: true
                                    nullable: true
                                    description: Additional metadata for the object
                                  score:
                                    type:
                                      - number
                                      - 'null'
                                  textScore:
                                    type:
                                      - string
                                      - 'null'
                                  scoreDate:
                                    type: string
                                    format: date-time
                                  scoreScale:
                                    type:
                                      - object
                                      - 'null'
                                    properties:
                                      sourcedId:
                                        type: string
                                    required:
                                      - sourcedId
                                  scorePercentile:
                                    type:
                                      - number
                                      - 'null'
                                  scoreStatus:
                                    type: string
                                    enum: *ref_15
                                  comment:
                                    type:
                                      - string
                                      - 'null'
                                  learningObjectiveSet:
                                    type:
                                      - array
                                      - 'null'
                                    items:
                                      type: object
                                      properties:
                                        source:
                                          type: string
                                        learningObjectiveResults:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              learningObjectiveId:
                                                type: string
                                              score:
                                                type: number
                                              textScore:
                                                type: string
                                            required:
                                              - learningObjectiveId
                                      required:
                                        - source
                                        - learningObjectiveResults
                                  inProgress:
                                    type:
                                      - string
                                      - 'null'
                                  incomplete:
                                    type:
                                      - string
                                      - 'null'
                                  late:
                                    type:
                                      - string
                                      - 'null'
                                  missing:
                                    type:
                                      - string
                                      - 'null'
                                required:
                                  - status
                                  - scoreDate
                                  - scoreStatus
                                description: Represents an assessment result.
                              description: Assessment results for the resource and student
                          required:
                            - type
                            - assessmentLineItemSourcedId
                            - courseComponentResourceSourcedId
                            - title
                            - results
                    description: Assessment line items for the course and student
                required:
                  - lineItems
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/lessonPlans/tree/{lessonPlanId}:
    get:
      operationId: getLessonPlan
      summary: Get a lesson plan tree by its ID
      description: |-
        Purpose: Get the complete lesson plan tree for a lesson plan.

        When to use:
        - When you need to display the full lesson plan to a student
        - For rendering the personalized learning path

        What it does:
        - Returns the lesson plan in a syllabus-like format
        - Includes only non-skipped items (visible content)
        - Shows the hierarchical structure with components and resources
        - Provides all original metadata needed for UI rendering
          
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: lessonPlanId
          description: Lesson plan ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Lesson plan tree
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonPlan:
                    type: object
                    properties:
                      lessonPlan:
                        type: object
                        properties:
                          course:
                            type: object
                            properties:
                              sourcedId:
                                type: string
                                minLength: 1
                              status:
                                type: string
                                enum: *ref_14
                              dateLastModified:
                                type: string
                                format: date-time
                              metadata:
                                type: object
                                additionalProperties: true
                                nullable: true
                                description: Additional metadata for the object
                              title:
                                type: string
                              academicSession:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  sourcedId:
                                    type: string
                                required:
                                  - sourcedId
                              schoolYear:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  href:
                                    type: string
                                    format: uri
                                  sourcedId:
                                    type: string
                                  type:
                                    type: string
                                    enum: *ref_13
                                required:
                                  - href
                                  - sourcedId
                                  - type
                              courseCode:
                                type:
                                  - string
                                  - 'null'
                              grades:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  allOf:
                                    - $ref: '#/components/schemas/GradeEnum'
                                  description: The grades of the course
                                  enum: *ref_8
                              subjects:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  allOf:
                                    - $ref: '#/components/schemas/SubjectEnum'
                                  description: The subjects of the course
                                  enum: *ref_10
                              subjectCodes:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  type: string
                              org:
                                type: object
                                properties:
                                  sourcedId:
                                    type: string
                                required:
                                  - sourcedId
                              level:
                                type:
                                  - string
                                  - 'null'
                              gradingScheme:
                                type:
                                  - string
                                  - 'null'
                              resources:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  type: object
                                  properties:
                                    href:
                                      type: string
                                      format: uri
                                    sourcedId:
                                      type: string
                                    type:
                                      type: string
                                      enum: *ref_13
                                  required:
                                    - href
                                    - sourcedId
                                    - type
                            required:
                              - status
                              - title
                              - org
                            description: Represents a course.
                          subComponents:
                            type: array
                            items:
                              $ref: '#/components/schemas/LessonPlanTreeComponent'
                        required:
                          - course
                          - subComponents
                    required:
                      - lessonPlan
                required:
                  - lessonPlan
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
  /powerpath/lessonPlans/tree/{lessonPlanId}/structure:
    get:
      operationId: getLessonPlanStructure
      summary: Get a lesson plan tree structure by its ID
      description: >-
        Purpose: Get a simplified structure for inspection and debugging.


        When to use:

        - For administractive tools and debugging

        - When you need to see the internal lesson plan structure without the
        full metadata


        What it does:

        - Returns a lightweight view of the lesson plan structure

        - Shows both skipped and non-skipped items

        - Includes order information and component/resource IDs (alos includes
        item ids but these should'n be relied on since they are not stable)

        - Useful for understanding the current state
          
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: lessonPlanId
          description: Lesson plan ID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Lesson plan tree structure
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonPlan:
                    type: object
                    properties:
                      lessonPlan:
                        type: object
                        properties:
                          id:
                            type: string
                          courseId:
                            type: string
                          courseTitle:
                            type: string
                          structure:
                            type: array
                            items:
                              $ref: '#/components/schemas/LessonPlanStructureNode'
                        required:
                          - id
                          - courseId
                          - courseTitle
                          - structure
                    required:
                      - lessonPlan
                required:
                  - lessonPlan
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
  /powerpath/lessonPlans/updateStudentItemResponse:
    post:
      operationId: updateStudentItemResponse
      summary: Update student item response
      description: >-

        Update the student item response for a student in a course.


        ---


        The item may be a **component** or **componentResource**.


        You should provide either the **componentId** or the
        **componentResourceId**.


        If you provide the **componentId**, the data in the response payload
        should be in relation to the student's response to the entire component.


        If you provide the **componentResourceId**, the data in the response
        payload should be in relation to the student's response to the specific
        resource.
            
      tags:
        - PowerPath - Lesson Plans
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                studentId:
                  type: string
                  minLength: 1
                componentResourceId:
                  type: string
                  minLength: 1
                result:
                  type: object
                  properties:
                    status:
                      type: string
                      enum: *ref_14
                    metadata:
                      type: object
                      additionalProperties: true
                      nullable: true
                      description: Additional metadata for the object
                    score:
                      type:
                        - number
                        - 'null'
                    textScore:
                      type:
                        - string
                        - 'null'
                    scoreDate:
                      type: string
                      format: date-time
                    scorePercentile:
                      type:
                        - number
                        - 'null'
                    scoreStatus:
                      type: string
                      enum: *ref_15
                    comment:
                      type:
                        - string
                        - 'null'
                    learningObjectiveSet:
                      type:
                        - array
                        - 'null'
                      items:
                        type: object
                        properties:
                          source:
                            type: string
                          learningObjectiveResults:
                            type: array
                            items:
                              type: object
                              properties:
                                learningObjectiveId:
                                  type: string
                                score:
                                  type: number
                                textScore:
                                  type: string
                              required:
                                - learningObjectiveId
                        required:
                          - source
                          - learningObjectiveResults
                    inProgress:
                      type:
                        - string
                        - 'null'
                    incomplete:
                      type:
                        - string
                        - 'null'
                    late:
                      type:
                        - string
                        - 'null'
                    missing:
                      type:
                        - string
                        - 'null'
                  required:
                    - status
                    - scoreDate
                    - scoreStatus
                  description: >-
                    The student's result for the item, either a component or a
                    componentResource
              required:
                - studentId
                - componentResourceId
                - result
      responses:
        '201':
          description: Student item response updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  componentResourceLineItem:
                    $ref: '#/components/schemas/AssessmentLineItem'
                  componentResourceResult:
                    $ref: '#/components/schemas/AssessmentResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/syllabus/{courseSourcedId}:
    get:
      operationId: getCourseSyllabus
      summary: Get course syllabus
      description: Get course syllabus
      tags:
        - PowerPath - Lesson Plans
      parameters:
        - name: courseSourcedId
          description: The course sourcedId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  syllabus:
                    description: The course syllabus content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/createNewAttempt:
    post:
      operationId: createNewAttempt
      summary: Create new attempt
      description: >

        Creates a new attempt for a student in a lesson if the current attempt
        is completed.


        For Assessment Bank lessons:

        - This will also update the state for the student, creating a new entry
        to associate the new attempt number with a different sub-resource of the
        test bank.

        - If the lesson is taken again by the student, a different test may be
        served, considering the new resource it points to configures a different
        test.

        - The sub-test is determined using round-robin logic over the
        sub-resources of the lesson's Assessment Bank Resource object.
          - So for example, if a lesson configures 2 sub-tests, the first attempt serves test 1, the second attempt serves test 2, the third attempt serves test 1 again, and so on.

        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object associated with it.
      tags:
        - PowerPath - Lesson Mastery
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                student:
                  type: string
                  description: The sourcedId of the student
                lesson:
                  type: string
                  description: The sourcedId of the lesson (ComponentResource)
              required:
                - student
                - lesson
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  attempt:
                    type: object
                    properties:
                      attempt:
                        type:
                          - number
                          - 'null'
                        description: The attempt number
                      score:
                        type: number
                        description: The current score for this attempt
                      scoreStatus:
                        type: string
                        enum: &ref_17
                          - exempt
                          - fully graded
                          - not submitted
                          - partially graded
                          - submitted
                        description: The status of this attempt
                      xp:
                        type:
                          - number
                          - 'null'
                        description: The XP earned in this attempt
                      startedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: When this attempt was started
                      completedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: When this attempt was completed
                    required:
                      - attempt
                      - score
                      - scoreStatus
                      - xp
                      - startedAt
                      - completedAt
                required:
                  - attempt
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/finalStudentAssessmentResponse:
    post:
      operationId: finalStudentAssessmentResponse
      summary: Finalize a test assessments
      description: >

        Finalize a lesson of type `quiz`, `test-out`, or `placement` after all
        questions have been answered:

        - Evaluates answered questions, attribute scores for each question, and
        overall lesson score.

        - Checks the correctness of the response using the QTI question's
        `<qti-response-declaration>` element and update the score accordingly.

        - Creates/updates the AssessmentLineItem and AssessmentResult objects
        for the student/question pair if it doesn't exist yet.


        Not supported for external test lessons as the 3rd party tool is
        responsible for finalizing the test. Use the
        **importExternalTestAssignmentResults** endpoint instead.


        Notice this may perform a course enrollment for the student if the
        lesson is a placement test or test-out, and the respective subject and
        grade are mapped to the Subject Track with a valid course set. 


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object with metadata.lessonType = "quiz", "test-out", or
        "placement" associated with it.
      tags:
        - PowerPath - Lesson Mastery
        - PowerPath - Course Mastery
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                student:
                  type: string
                  description: The sourcedId of the student
                lesson:
                  type: string
                  description: The sourcedId of the lesson (ComponentResource)
              required:
                - student
                - lesson
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  lessonType:
                    type: string
                    enum: &ref_16
                      - quiz
                      - test-out
                      - placement
                      - unit-test
                  finalized:
                    type: boolean
                    description: >-
                      Whether the lesson has been finalized in the current
                      attempt
                  attempt:
                    type: number
                    description: The attempt number
                required:
                  - lessonType
                  - finalized
                  - attempt
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/getAssessmentProgress:
    get:
      operationId: getAssessmentProgress
      summary: Get assessment progress
      description: >

        Returns the progress the student has made in the given PowerPath lesson.


        A 'Lesson' in this context is a ComponentResource object paired with a
        Resource object representing an activity.
      tags:
        - PowerPath - Lesson Mastery
        - PowerPath - Course Mastery
      parameters:
        - in: query
          name: student
          description: The sourcedId of the student who is answering the question
          schema:
            type: string
            description: The sourcedId of the student who is answering the question
          required: true
        - in: query
          name: lesson
          description: The sourcedId of the lesson (ComponentResource)
          schema:
            type: string
            description: The sourcedId of the lesson (ComponentResource)
          required: true
        - in: query
          name: attempt
          description: The attempt number of the lesson that the student is answering
          schema:
            type: string
            description: The attempt number of the lesson that the student is answering
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PowerPath100ProgressResult'
                  - type: object
                    properties:
                      lessonType:
                        type: string
                        enum: *ref_16
                      finalized:
                        type: boolean
                        description: >-
                          Whether the lesson has been finalized in the current
                          attempt
                      score:
                        type: number
                        description: The current score for this attempt
                      questions:
                        type: array
                        items:
                          $ref: '#/components/schemas/PowerPathTestQuestion'
                      toolProvider:
                        type:
                          - string
                          - 'null'
                        description: The tool provider of the lesson if external
                      enrollmentFailed:
                        type: boolean
                        description: >-
                          Whether auto-enrollment failed due to missing subject
                          track or enrollment error. Only present for finalized
                          external tests.
                      testResultId:
                        type: string
                        description: The sourcedId of the parent test AssessmentResult
                      attempt:
                        type: number
                        description: The attempt number
                      xp:
                        type:
                          - number
                          - 'null'
                        description: The XP the student has earned in the lesson
                      multiplier:
                        type:
                          - number
                          - 'null'
                        description: The multiplier for the student's XP
                      accuracy:
                        type: number
                        description: The accuracy of the student's attempted questions
                      correctQuestions:
                        type: number
                        description: >-
                          The number of correct questions the student has
                          answered in the lesson
                      totalQuestions:
                        type: number
                        description: The total number of questions in the lesson
                    required:
                      - lessonType
                      - finalized
                      - questions
                      - toolProvider
                      - attempt
                      - xp
                      - multiplier
                      - accuracy
                      - correctQuestions
                      - totalQuestions
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/getAttempts:
    get:
      operationId: getAttempts
      summary: Get all attempts
      description: >

        Returns a list of all attempts for a student in a lesson


        For Assessment Bank lessons, each attempt may represent a different sub
        test of the bank. Review results with care.


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object associated with it.
      tags:
        - PowerPath - Lesson Mastery
      parameters:
        - in: query
          name: student
          description: The sourcedId of the student
          schema:
            type: string
            description: The sourcedId of the student
          required: true
        - in: query
          name: lesson
          description: The sourcedId of the lesson (ComponentResource)
          schema:
            type: string
            description: The sourcedId of the lesson (ComponentResource)
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  attempts:
                    type: array
                    items:
                      type: object
                      properties:
                        attempt:
                          type:
                            - number
                            - 'null'
                          description: The attempt number
                        score:
                          type: number
                          description: The current score for this attempt
                        scoreStatus:
                          type: string
                          enum: *ref_17
                          description: The status of this attempt
                        xp:
                          type:
                            - number
                            - 'null'
                          description: The XP earned in this attempt
                        startedAt:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          description: When this attempt was started
                        completedAt:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          description: When this attempt was completed
                      required:
                        - attempt
                        - score
                        - scoreStatus
                        - xp
                        - startedAt
                        - completedAt
                required:
                  - attempts
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/getNextQuestion:
    get:
      operationId: getNextQuestion
      summary: Get next question
      description: >

        Returns the next question in the given PowerPath component resource.


        Works only with lessons of type 'powerpath-100'.


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object associated with it.
      tags:
        - PowerPath - Lesson Mastery
      parameters:
        - in: query
          name: student
          description: The sourcedId of the student who is answering the question
          schema:
            type: string
            description: The sourcedId of the student who is answering the question
          required: true
        - in: query
          name: lesson
          description: The sourcedId of the lesson (ComponentResource)
          schema:
            type: string
            description: The sourcedId of the lesson (ComponentResource)
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  score:
                    type: number
                    description: The current PowerPath score of the student in this lesson
                  question:
                    $ref: '#/components/schemas/PowerPathTestQuestion'
                required:
                  - score
                  - question
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/render-config/:
    put:
      operationId: upsertRenderConfig
      summary: Create or update render config for one or more courses
      description: >-
        Assigns a custom renderer configuration to one or more courses. If a
        config already exists for a course, it is updated.
      tags:
        - PowerPath - Lesson Mastery
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                courseIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
                rendererId:
                  type: string
                  minLength: 1
                rendererUrl:
                  type: string
                  format: uri
                rendererVersion:
                  type: string
                suppressFeedback:
                  type: boolean
                  default: false
                suppressCorrectResponse:
                  type: boolean
                  default: false
              required:
                - courseIds
                - rendererId
                - rendererUrl
      responses:
        '200':
          description: Render config upserted
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated:
                    type: array
                    items:
                      type: string
                required:
                  - updated
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/render-config/{courseId}:
    get:
      operationId: getRenderConfig
      summary: Get render config for a course
      description: >-
        Returns the custom renderer configuration for a course, or 404 if none
        is configured.
      tags:
        - PowerPath - Lesson Mastery
      parameters:
        - name: courseId
          description: The sourcedId of the course
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Render config found
          content:
            application/json:
              schema:
                type: object
                properties:
                  courseId:
                    type: string
                  rendererId:
                    type: string
                  rendererUrl:
                    type: string
                  rendererVersion:
                    type:
                      - string
                      - 'null'
                  suppressFeedback:
                    type: boolean
                  suppressCorrectResponse:
                    type: boolean
                required:
                  - courseId
                  - rendererId
                  - rendererUrl
                  - suppressFeedback
                  - suppressCorrectResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: No render config found for this course
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
    delete:
      operationId: deleteRenderConfig
      summary: Delete render config for a course
      description: Removes the custom renderer configuration for a course.
      tags:
        - PowerPath - Lesson Mastery
      parameters:
        - name: courseId
          description: The sourcedId of the course
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Render config deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted:
                    type: string
                required:
                  - deleted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/resetAttempt:
    post:
      operationId: resetAttempt
      summary: Reset attempt
      description: >

        Resets the attempt for the given PowerPath lesson of a student:

        - Soft-deletes all previous question responses, resets the test score to
        0, and updates its 'scoreStatus' to "not submitted".

        - If the lesson is an external test, only resets the test score to 0.


        For Assessment Bank lessons, this will keep the user state in the same
        bank test for the current attempt.


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object associated with it.
      tags:
        - PowerPath - Lesson Mastery
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                student:
                  type: string
                  description: >-
                    The sourcedId of the student for who the attempt should be
                    reset
                lesson:
                  type: string
                  description: The sourcedId of the lesson (ComponentResource)
              required:
                - student
                - lesson
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the reset was successful
                  score:
                    type: number
                    description: The reset score (always 0)
                required:
                  - success
                  - score
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
  /powerpath/updateStudentQuestionResponse:
    put:
      operationId: updateStudentQuestionResponse
      summary: Update student question response
      description: >

        Updates the student's response to a question and returns the updated
        PowerPath score:

        - Checks the correctness of the response using the QTI question
        `<qti-response-declaration>` element and update the score accordingly.

        - Creates/updates the AssessmentLineItem and AssessmentResult objects
        for the student/question pair if it doesn't exist yet.


        A 'Lesson' in this context is a ComponentResource object which has a
        Resource object associated with it.
      tags:
        - PowerPath - Lesson Mastery
        - PowerPath - Course Mastery
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStudentQuestionResponseInput'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/PowerPath100UpdateStudentQuestionResponseResult
                  - $ref: >-
                      #/components/schemas/QuizUpdateStudentQuestionResponseResult
                  - $ref: >-
                      #/components/schemas/TestOutUpdateStudentQuestionResponseResult
                  - $ref: >-
                      #/components/schemas/PlacementUpdateStudentQuestionResponseResult
                  - $ref: >-
                      #/components/schemas/UnitTestUpdateStudentQuestionResponseResult
                discriminator:
                  propertyName: lessonType
                  mapping:
                    powerpath-100: >-
                      #/components/schemas/PowerPath100UpdateStudentQuestionResponseResult
                    quiz: >-
                      #/components/schemas/QuizUpdateStudentQuestionResponseResult
                    test-out: >-
                      #/components/schemas/TestOutUpdateStudentQuestionResponseResult
                    placement: >-
                      #/components/schemas/PlacementUpdateStudentQuestionResponseResult
                    unit-test: >-
                      #/components/schemas/UnitTestUpdateStudentQuestionResponseResult
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedRequestResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable Entity / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
components:
  securitySchemes:
    MCP:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/authorize
          tokenUrl: >-
            https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/token
          scopes:
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-core.readonly: Read access to roster core
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster.readonly: Read access to roster
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-demographics.readonly: Read access to roster demographics
            https://purl.imsglobal.org/spec/or/v1p1/scope/resource.readonly: Read access to resource
            https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.readonly: Read access to gradebook
            https://purl.imsglobal.org/spec/powerpath/v1p1/scope/powerpath.readonly: Read access to powerpath
            https://purl.imsglobal.org/spec/ob/v3p0/scope/credential.readonly: Read your issued badges
            https://purl.imsglobal.org/spec/clr/v2p0/scope/credential.readonly: Read access to CLR
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          scopes:
            https://purl.imsglobal.org/spec/or/v1p1/scope/admin: Admin access to the API
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-core.readonly: Read access to roster core
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster.readonly: Read access to roster
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster.createput: Create and update access to roster
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster.delete: Delete access to roster
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-demographics.readonly: Read access to roster demographics
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-demographics.createput: Create and update access to roster demographics
            https://purl.imsglobal.org/spec/or/v1p1/scope/roster-demographics.delete: Delete access to roster demographics
            https://purl.imsglobal.org/spec/or/v1p1/scope/resource.readonly: Read access to resource
            https://purl.imsglobal.org/spec/or/v1p1/scope/resource.createput: Create and update access to resource
            https://purl.imsglobal.org/spec/or/v1p1/scope/resource.delete: Delete access to resource
            https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.readonly: Read access to gradebook
            https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.createput: Create and update access to gradebook
            https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.delete: Delete access to gradebook
            https://purl.imsglobal.org/spec/powerpath/v1p1/scope/powerpath.readonly: Read access to powerpath
            https://purl.imsglobal.org/spec/powerpath/v1p1/scope/powerpath.createput: Create and update access to powerpath
            https://purl.imsglobal.org/spec/powerpath/v1p1/scope/powerpath.delete: Delete access to powerpath
            https://purl.imsglobal.org/spec/powerpath/v1p1/scope/powerpath.admin: Admin access to powerpath
            https://purl.imsglobal.org/spec/ob/v3p0/scope/credential.readonly: Read your issued badges
            https://purl.imsglobal.org/spec/ob/v3p0/scope/credential.upsert: Store new badges in your account
            https://purl.imsglobal.org/spec/ob/v3p0/scope/credential.delete: Delete access to open badges
            https://purl.imsglobal.org/spec/ob/v3p0/scope/credential.admin: Administrative access to open badges
            https://purl.imsglobal.org/spec/clr/v2p0/scope/credential.readonly: Read access to CLR
            https://purl.imsglobal.org/spec/clr/v2p0/scope/credential.upsert: Create and update access to CLR
            https://purl.imsglobal.org/spec/clr/v2p0/scope/credential.admin: Administrative access to CLR
          tokenUrl: >-
            https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/token
  schemas:
    SubjectEnum:
      type: string
      enum: *ref_10
    BadRequestResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: invaliddata
                    description: The field value for the minor code
                    example: invaliddata
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    UnauthorizedRequestResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: unauthorisedrequest
                    description: The field value for the minor code
                    example: unauthorisedrequest
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    ForbiddenResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: forbidden
                    description: The field value for the minor code
                    example: forbidden
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    NotFoundResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: unknownobject
                    description: The field value for the minor code
                    example: unknownobject
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    UnprocessableEntityResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: invaliddata
                    description: The field value for the minor code
                    example: invaliddata
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    TooManyRequestsResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: server_busy
                    description: The field value for the minor code
                    example: server_busy
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    InternalServerErrorResponse:
      type: object
      properties:
        imsx_codeMajor:
          type: string
          default: failure
          description: The major response code
          example: failure
        imsx_severity:
          type: string
          default: error
          description: The severity of the response
          example: error
        imsx_description:
          type: string
        imsx_CodeMinor:
          type: object
          properties:
            imsx_codeMinorField:
              type: array
              items:
                type: object
                properties:
                  imsx_codeMinorFieldName:
                    type: string
                    default: TargetEndSystem
                    description: The field name for the minor code
                    example: TargetEndSystem
                  imsx_codeMinorFieldValue:
                    type: string
                    default: internal_server_error
                    description: The field value for the minor code
                    example: internal_server_error
                required:
                  - imsx_codeMinorFieldName
                  - imsx_codeMinorFieldValue
          required:
            - imsx_codeMinorField
        imsx_error_details:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
      required:
        - imsx_codeMajor
        - imsx_severity
        - imsx_description
        - imsx_CodeMinor
    GradeEnum:
      type: string
      enum: *ref_8
      description: >-
        Grade levels. -1 is Pre-K, 0 is Kindergarten, 1-12 are grades 1-12, 13
        is AP.
      example: '3'
    CreateExternalTestOutInput:
      type: object
      properties:
        courseId:
          type: string
          description: The sourcedId of the Course to create the external test for
        lessonTitle:
          type: string
          description: The title of the external test reference
        launchUrl:
          type: string
          description: The URL to the external test system (e.g., Edulastic, QTI, etc.)
        toolProvider:
          type: string
          enum:
            - AlphaTest
            - edulastic
            - mastery-track
          description: 'The type of external service (e.g.: ''edulastic'')'
        unitTitle:
          type: string
          description: The title of the unit containing the external test
        courseComponentSourcedId:
          type: string
          description: >-
            The sourcedId of an existing CourseComponent (unit) for the test. If
            not provided, a new unit will be created.
        vendorId:
          type: string
          description: The ID of the test in the spreadsheet
        description:
          type: string
          description: >-
            Description of the external test that will be added to the Resource
            entity's metadata
        resourceMetadata:
          type: 'null'
          description: Additional metadata for the external test resource
        grades:
          type: array
          items:
            type: string
            description: The grades of the course
            enum: *ref_8
          description: The grades for the resource
        lessonType:
          type: string
          const: test-out
        xp:
          type: number
          description: The XP value for the resource
      required:
        - courseId
        - toolProvider
        - grades
        - lessonType
        - xp
      description: Input for creating an external test-out lesson
    CreateExternalPlacementInput:
      type: object
      properties:
        courseId:
          type: string
          description: The sourcedId of the Course to create the external test for
        lessonTitle:
          type: string
          description: The title of the external test reference
        launchUrl:
          type: string
          description: The URL to the external test system (e.g., Edulastic, QTI, etc.)
        toolProvider:
          type: string
          enum:
            - AlphaTest
            - edulastic
            - mastery-track
          description: 'The type of external service (e.g.: ''edulastic'')'
        unitTitle:
          type: string
          description: The title of the unit containing the external test
        courseComponentSourcedId:
          type: string
          description: >-
            The sourcedId of an existing CourseComponent (unit) for the test. If
            not provided, a new unit will be created.
        vendorId:
          type: string
          description: The ID of the test in the spreadsheet
        description:
          type: string
          description: >-
            Description of the external test that will be added to the Resource
            entity's metadata
        resourceMetadata:
          type: 'null'
          description: Additional metadata for the external test resource
        grades:
          type: array
          items:
            type: string
            description: The grades of the course
            enum: *ref_8
          description: The grades for the resource
        lessonType:
          type: string
          const: placement
        courseIdOnFail:
          type:
            - string
            - 'null'
          description: >-
            The courseId to enroll the student in if they fail the placement
            test (optional)
        xp:
          type: number
          description: The XP value for the resource
      required:
        - courseId
        - toolProvider
        - grades
        - lessonType
      description: Input for creating an external placement test
    CreateInternalQtiTestInput:
      type: object
      properties:
        courseId:
          type: string
          description: The sourcedId of the Course to create the internal test for
        lessonType:
          type: string
          enum:
            - powerpath-100
            - quiz
            - test-out
            - placement
            - unit-test
            - alpha-read-article
          description: The type of lesson to create
        lessonTitle:
          type: string
          description: Optional title for the lesson (ComponentResource)
        unitTitle:
          type: string
          description: Optional title for the unit (CourseComponent)
        courseComponentSourcedId:
          type: string
          description: Optional sourcedId of existing CourseComponent to reuse
        resourceMetadata:
          type: 'null'
          description: Additional metadata for the internal test resource
        xp:
          type: number
          description: The XP value for the resource (for test-out lessons)
        grades:
          type: array
          items:
            type: string
            description: The grades of the course
            enum: *ref_8
          description: The grades for the resource (for placement tests)
        courseIdOnFail:
          type:
            - string
            - 'null'
          description: >-
            The courseId to enroll the student in if they fail the placement
            test (optional)
        testType:
          type: string
          const: qti
        qti:
          type: object
          properties:
            url:
              type: string
              format: uri
              description: The URL to the QTI test XML file
            title:
              type: string
              description: Optional title for the QTI test
            metadata:
              type: object
              additionalProperties: {}
              description: Additional metadata for the QTI resource
          required:
            - url
      required:
        - courseId
        - lessonType
        - testType
        - qti
      description: Input for creating an internal QTI test
    CreateInternalAssessmentBankInput:
      type: object
      properties:
        courseId:
          type: string
          description: The sourcedId of the Course to create the internal test for
        lessonType:
          type: string
          enum:
            - powerpath-100
            - quiz
            - test-out
            - placement
            - unit-test
            - alpha-read-article
          description: The type of lesson to create
        lessonTitle:
          type: string
          description: Optional title for the lesson (ComponentResource)
        unitTitle:
          type: string
          description: Optional title for the unit (CourseComponent)
        courseComponentSourcedId:
          type: string
          description: Optional sourcedId of existing CourseComponent to reuse
        resourceMetadata:
          type: 'null'
          description: Additional metadata for the internal test resource
        xp:
          type: number
          description: The XP value for the resource (for test-out lessons)
        grades:
          type: array
          items:
            type: string
            description: The grades of the course
            enum: *ref_8
          description: The grades for the resource (for placement tests)
        courseIdOnFail:
          type:
            - string
            - 'null'
          description: >-
            The courseId to enroll the student in if they fail the placement
            test (optional)
        testType:
          type: string
          const: assessment-bank
        assessmentBank:
          type: object
          properties:
            resources:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
                    description: The URL to the QTI test XML file
                  title:
                    type: string
                    description: Title for this assessment bank resource
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: Additional metadata for the QTI resource
                required:
                  - url
              minItems: 1
              description: Array of QTI resources that will make up the assessment bank
          required:
            - resources
      required:
        - courseId
        - lessonType
        - testType
        - assessmentBank
      description: Input for creating an internal assessment bank test
    TestOutResult:
      type: object
      properties:
        lessonType:
          type: string
          const: test-out
        lessonId:
          type:
            - string
            - 'null'
          description: The id of the testOut lesson
        finalized:
          type: boolean
          description: Whether the Test Out has been finalized in the current attempt
        toolProvider:
          type:
            - string
            - 'null'
          description: The tool provider for the testOut lesson
        attempt:
          type: number
          description: The attempt number
        credentials:
          type: object
          properties:
            email:
              type: string
              format: email
            password:
              type: string
          required:
            - email
            - password
          description: The credentials for accessing the assigned test on external tool
        assignmentId:
          type: string
          description: The id of the assignment on external tool for results retrieval
        classId:
          type: string
          description: >-
            The id of the class on external tool for results retrieval (may be
            empty for some tools)
        testUrl:
          type: string
          format: uri
          description: The URL of the test on external tool
        testId:
          type: string
          description: >-
            The id of the test on external tool (may be assignment ID for some
            tools)
      required:
        - lessonType
        - lessonId
        - finalized
        - toolProvider
      description: >-
        Holds the id of the TestOut lesson (ComponentResource), or its results
        in case it was previously attempted
    LessonPlanTreeComponent:
      type: object
      properties:
        id:
          type: string
          description: The ID of the lesson plan item
        sourcedId:
          type: string
          description: The Sourced ID of the component
        status:
          type: string
          enum:
            - active
            - tobedeleted
        title:
          type: string
        sortOrder:
          type: string
        unlockDate:
          type: string
        metadata:
          type: object
          additionalProperties: {}
        prerequisites:
          type: array
          items:
            type: string
        prerequisiteCriteria:
          type: string
        componentResources:
          type: array
          items:
            type: object
            properties:
              tenantId:
                type:
                  - string
                  - 'null'
              clientAppId:
                type:
                  - string
                  - 'null'
              id:
                type: string
                description: The ID of the lesson plan item
              sortOrder:
                type: string
              metadata:
                type: object
                additionalProperties: {}
              courseComponentSourcedId:
                type: string
              resource:
                allOf:
                  - $ref: '#/components/schemas/Resource'
                properties:
                  metadataDetails:
                    type: object
                    properties:
                      type:
                        type: string
                    required:
                      - type
                required:
                  - metadataDetails
            required:
              - tenantId
              - clientAppId
              - id
              - courseComponentSourcedId
              - resource
        subComponents:
          type: array
          items:
            $ref: '#/components/schemas/LessonPlanTreeComponent'
      required:
        - id
        - sourcedId
        - status
        - title
    Resource:
      type: object
      properties:
        sourcedId:
          type: string
        status:
          type: string
          enum: *ref_14
        dateLastModified:
          type: string
          format: date-time
        metadata:
          type: object
          additionalProperties: true
          nullable: true
          description: Additional metadata for the object
        title:
          type: string
        roles:
          type: array
          items:
            type: string
            enum:
              - primary
              - secondary
        importance:
          type: string
          enum:
            - primary
            - secondary
        vendorResourceId:
          type: string
        vendorId:
          type:
            - string
            - 'null'
        applicationId:
          type:
            - string
            - 'null'
      required:
        - sourcedId
        - status
        - title
        - vendorResourceId
      description: Represents a digital resource of some kind.
    SetSkippedCommand:
      type: object
      properties:
        type:
          type: string
          const: set-skipped
        payload:
          type: object
          properties:
            target:
              type: object
              properties:
                type:
                  type: string
                  enum: &ref_18
                    - component
                    - resource
                id:
                  type: string
              required:
                - type
                - id
              description: The target item to set the skipped attribute of
            value:
              type: boolean
              description: The value to set the skipped attribute to
          required:
            - target
            - value
          additionalProperties: false
      required:
        - type
        - payload
      additionalProperties: false
      title: Set Skipped
      description: >-
        Set the skipped attribute of a lesson plan item, effectively changing
        it's visibility for the student
    AddCustomResourceCommand:
      type: object
      properties:
        type:
          type: string
          const: add-custom-resource
        payload:
          type: object
          properties:
            resource_id:
              type: string
            parent_component_id:
              type: string
            skipped:
              type: boolean
              default: false
          required:
            - resource_id
            - parent_component_id
          additionalProperties: false
      required:
        - type
        - payload
      additionalProperties: false
      title: Add Custom Resource
      description: >-
        Add a custom resource to the lesson plan under a component, by default
        the resource is placed at the end of the component
    MoveItemBeforeCommand:
      type: object
      properties:
        type:
          type: string
          const: move-item-before
        payload:
          type: object
          properties:
            target:
              type: object
              properties:
                type:
                  type: string
                  enum: *ref_18
                id:
                  type: string
              required:
                - type
                - id
            reference_id:
              type: string
          required:
            - target
            - reference_id
          additionalProperties: false
      required:
        - type
        - payload
      additionalProperties: false
      title: Move Item Before
      description: Move a lesson plan item to be before another item
    MoveItemAfterCommand:
      type: object
      properties:
        type:
          type: string
          const: move-item-after
        payload:
          type: object
          properties:
            target:
              type: object
              properties:
                type:
                  type: string
                  enum: *ref_18
                id:
                  type: string
              required:
                - type
                - id
            reference_id:
              type: string
          required:
            - target
            - reference_id
          additionalProperties: false
      required:
        - type
        - payload
      additionalProperties: false
      title: Move Item After
      description: Move a lesson plan item to be after another item
    MoveItemToStartCommand:
      type: object
      properties:
        type:
          type: string
          const: move-item-to-start
        payload:
          type: object
          properties:
            target:
              type: object
              properties:
                type:
                  type: string
                  enum: *ref_18
                id:
                  type: string
              required:
                - type
                - id
          required:
            - target
          additionalProperties: false
      required:
        - type
        - payload
      additionalProperties: false
      title: Move Item To Start
      description: Move a lesson plan item to the start of the parent
    MoveItemToEndCommand:
      type: object
      properties:
        type:
          type: string
          const: move-item-to-end
        payload:
          type: object
          properties:
            target:
              type: object
              properties:
                type:
                  type: string
                  enum: *ref_18
                id:
                  type: string
              required:
                - type
                - id
          required:
            - target
          additionalProperties: false
      required:
        - type
        - payload
      additionalProperties: false
      title: Move Item To End
      description: Move a lesson plan item to the end of the parent
    ChangeItemParentCommand:
      type: object
      properties:
        type:
          type: string
          const: change-item-parent
        payload:
          type: object
          properties:
            target:
              type: object
              properties:
                type:
                  type: string
                  enum: *ref_18
                id:
                  type: string
              required:
                - type
                - id
            new_parent_id:
              type: string
            position:
              type: string
              enum:
                - start
                - end
              default: end
          required:
            - target
            - new_parent_id
      required:
        - type
        - payload
      additionalProperties: false
      title: Change Item Parent
      description: >-
        Change the parent of a lesson plan item, by default the item is placed
        at the end of the parent
    LessonPlanStructureNode:
      type: object
      properties:
        componentResourceId:
          type: string
        componentId:
          type: string
        type:
          type: string
          enum:
            - component
            - resource
        title:
          type: string
        order:
          type: string
        skipped:
          type: boolean
        itemId:
          type: string
        componentResources:
          type: array
          items:
            $ref: '#/components/schemas/LessonPlanStructureNode'
        subComponents:
          type: array
          items:
            $ref: '#/components/schemas/LessonPlanStructureNode'
      required:
        - type
        - title
        - order
        - skipped
        - itemId
    AssessmentLineItem:
      type: object
      properties:
        sourcedId:
          type: string
          minLength: 1
        status:
          type: string
          enum: *ref_14
        dateLastModified:
          type: string
          format: date-time
        metadata:
          type: object
          additionalProperties: true
          nullable: true
          description: Additional metadata for the object
        title:
          type: string
        description:
          type:
            - string
            - 'null'
        class:
          type:
            - object
            - 'null'
          properties:
            sourcedId:
              type: string
          required:
            - sourcedId
        parentAssessmentLineItem:
          type:
            - object
            - 'null'
          properties:
            sourcedId:
              type: string
          required:
            - sourcedId
          description: Represents a parent assessment line item.
        scoreScale:
          type:
            - object
            - 'null'
          properties:
            sourcedId:
              type: string
          required:
            - sourcedId
          description: Represents a score scale.
        resultValueMin:
          type:
            - number
            - 'null'
        resultValueMax:
          type:
            - number
            - 'null'
        component:
          type:
            - object
            - 'null'
          properties:
            sourcedId:
              type: string
          required:
            - sourcedId
          description: >-
            PROPRIETARY EXTENSION: Reference to the Component that this
            assessment line item is associated with. Enables enhanced curriculum
            mapping.
        componentResource:
          type:
            - object
            - 'null'
          properties:
            sourcedId:
              type: string
          required:
            - sourcedId
          description: >-
            PROPRIETARY EXTENSION: Reference to the Component Resource that this
            assessment line item is associated with. Supports detailed
            content-to-assessment relationships.
        learningObjectiveSet:
          $ref: '#/components/schemas/LearningObjectiveSet'
        course:
          type:
            - object
            - 'null'
          properties:
            sourcedId:
              type: string
          required:
            - sourcedId
          description: >-
            PROPRIETARY EXTENSION: Reference to the Course that this assessment
            line item is associated with.
      required:
        - status
        - title
      description: Represents an assessment line item.
    LearningObjectiveSet:
      type:
        - array
        - 'null'
      items:
        type: object
        properties:
          source:
            type: string
          learningObjectiveIds:
            type: array
            items:
              type: string
        required:
          - source
          - learningObjectiveIds
      description: Represents a learning objective set.
    AssessmentResult:
      type: object
      properties:
        sourcedId:
          type: string
          minLength: 1
        status:
          type: string
          enum: *ref_14
        dateLastModified:
          type: string
          format: date-time
        metadata:
          type: object
          additionalProperties: true
          nullable: true
          description: Additional metadata for the object
        assessmentLineItem:
          type: object
          properties:
            sourcedId:
              type: string
          required:
            - sourcedId
        student:
          type: object
          properties:
            sourcedId:
              type: string
          required:
            - sourcedId
        score:
          type:
            - number
            - 'null'
        textScore:
          type:
            - string
            - 'null'
        scoreDate:
          type: string
          format: date-time
        scoreScale:
          type:
            - object
            - 'null'
          properties:
            sourcedId:
              type: string
          required:
            - sourcedId
        scorePercentile:
          type:
            - number
            - 'null'
        scoreStatus:
          type: string
          enum: *ref_15
        comment:
          type:
            - string
            - 'null'
        learningObjectiveSet:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              source:
                type: string
              learningObjectiveResults:
                type: array
                items:
                  type: object
                  properties:
                    learningObjectiveId:
                      type: string
                    score:
                      type: number
                    textScore:
                      type: string
                  required:
                    - learningObjectiveId
            required:
              - source
              - learningObjectiveResults
        inProgress:
          type:
            - string
            - 'null'
        incomplete:
          type:
            - string
            - 'null'
        late:
          type:
            - string
            - 'null'
        missing:
          type:
            - string
            - 'null'
      required:
        - status
        - assessmentLineItem
        - student
        - scoreDate
        - scoreStatus
      description: Represents an assessment result.
    PowerPath100ProgressResult:
      type: object
      properties:
        lessonType:
          type: string
          const: powerpath-100
        remainingQuestionsPerDifficulty:
          type: object
          properties:
            easy:
              type: number
            medium:
              type: number
            hard:
              type: number
          required:
            - easy
            - medium
            - hard
        score:
          type: number
          description: The current score for this attempt
        seenQuestions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The ID that represents the question in the test
              index:
                type: number
                description: The index of the question in the test
              title:
                type: string
                description: The title of the question
              url:
                type: string
                format: uri
                description: The URL of the QTI question
              difficulty:
                type: string
                enum: &ref_19
                  - easy
                  - medium
                  - hard
                default: medium
                description: The difficulty of the question
              humanApproved:
                type:
                  - boolean
                  - 'null'
                description: Whether the question has been approved by a human
              content:
                type: object
                properties:
                  type:
                    type: string
                    description: The type of the question
                  rawXml:
                    type: string
                    description: The raw XML question in QTI format
                required:
                  - rawXml
                description: The QTI content of the question
              response:
                anyOf:
                  - type: string
                  - type: array
                    items:
                      type: string
                description: The student's response to the question
              responses:
                type: object
                additionalProperties:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                description: >-
                  Object containing response identifiers as keys and their
                  corresponding values as strings or arrays of strings
              correct:
                type: boolean
                description: Whether the student's response is correct
              result:
                type: object
                properties:
                  outcomes:
                    type: object
                    additionalProperties:
                      type: string
                    description: The outcomes of the question
                  score:
                    type: number
                    description: >-
                      The score assigned to the question, considering the
                      student's response
                  feedback:
                    type: string
                    description: The feedback for the question
                required:
                  - score
                  - feedback
                description: The result of the question
              resultId:
                type: string
                description: >-
                  The sourcedId of the AssessmentResult for this question
                  attempt
              learningObjectives:
                type: array
                items:
                  type: string
                description: Array of learning objective IDs associated with the question
              playerState:
                type: string
                description: >-
                  Opaque renderer state for session restoration (Mode B external
                  renderers only)
            required:
              - id
              - index
              - title
              - url
              - difficulty
            description: A PowerPath Test Question
        testResultId:
          type: string
          description: The sourcedId of the parent test AssessmentResult
        attempt:
          type: number
          description: The attempt number
        xp:
          type:
            - number
            - 'null'
          description: The XP the student has earned in the lesson
        multiplier:
          type:
            - number
            - 'null'
          description: The multiplier for the student's XP
        accuracy:
          type: number
          description: The accuracy of the student's attempted questions
        correctQuestions:
          type: number
          description: >-
            The number of correct questions the student has answered in the
            lesson
        totalQuestions:
          type: number
          description: The total number of questions in the lesson
      required:
        - lessonType
        - remainingQuestionsPerDifficulty
        - score
        - seenQuestions
        - attempt
        - xp
        - multiplier
        - accuracy
        - correctQuestions
        - totalQuestions
      description: Represents the progress of the student in the PowerPath100 lesson
    PowerPathTestQuestion:
      type: object
      properties:
        id:
          type: string
          description: The ID that represents the question in the test
        index:
          type: number
          description: The index of the question in the test
        title:
          type: string
          description: The title of the question
        url:
          type: string
          format: uri
          description: The URL of the QTI question
        difficulty:
          type: string
          enum: *ref_19
          default: medium
          description: The difficulty of the question
        humanApproved:
          type:
            - boolean
            - 'null'
          description: Whether the question has been approved by a human
        content:
          type: object
          properties:
            type:
              type: string
              description: The type of the question
            rawXml:
              type: string
              description: The raw XML question in QTI format
          required:
            - rawXml
          description: The QTI content of the question
        response:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          description: The student's response to the question
        responses:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
          description: The student's responses to the question
        correct:
          type: boolean
          description: Whether the student's response is correct
        result:
          type: object
          properties:
            outcomes:
              type: object
              additionalProperties:
                type: string
              description: The outcomes of the question
            score:
              type: number
              description: >-
                The score assigned to the question, considering the student's
                response
            feedback:
              type: string
              description: The feedback for the question
          required:
            - score
            - feedback
          description: The result of the question
        resultId:
          type: string
          description: The sourcedId of the AssessmentResult for this question attempt
        learningObjectives:
          type: array
          items:
            type: string
          description: Array of learning objective IDs associated with the question
      required:
        - id
        - index
        - title
        - url
        - difficulty
      description: A PowerPath Test Question
    UpdateStudentQuestionResponseInput:
      type: object
      properties:
        student:
          type: string
          description: The sourcedId of the student who is answering the question
        question:
          type: string
          description: >-
            The QTI question identifier from the lesson's question bank. This
            identifier corresponds to a specific question fetched from the QTI
            test URL stored in the lesson's Resource metadata.
        response:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
          deprecated: true
          description: >-
            DEPRECATED: Use 'responses' instead. / The student's response to the
            question. Might be the reference to the choice specified in the QTI
            structure.
        responses:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
          description: >-
            Object containing response identifiers as keys and their
            corresponding values as strings or arrays of strings
        lesson:
          type: string
          description: The sourcedId of the lesson (ComponentResource)
        rendererOutcomes:
          type: object
          properties:
            score:
              type: number
            maxScore:
              type: number
              minimum: 0
            isCorrect:
              type: boolean
          required:
            - score
            - maxScore
            - isCorrect
          description: >-
            Mode B renderer-provided outcomes. When present, the platform
            accepts these outcomes and skips backend grading via beyond-qti-2.
        playerState:
          type: string
          description: >-
            Opaque renderer state blob for session restoration. Stored by the
            platform without parsing.
      required:
        - student
        - question
        - lesson
      description: The input for the updateStudentQuestionResponse endpoint
    PowerPath100UpdateStudentQuestionResponseResult:
      type: object
      properties:
        lessonType:
          type: string
          const: powerpath-100
        powerpathScore:
          type: number
          description: The updated PowerPath score of the student in this lesson
        responseResult:
          type: object
          properties:
            isCorrect:
              type: boolean
              description: Whether the student's response is correct
            score:
              type: number
              description: The score for this specific response (0 or 1)
            feedback:
              description: Optional feedback for the student's response
          required:
            - isCorrect
            - score
          description: The result of processing the student's response
        questionResult:
          description: The assessment result object for the question (for debugging)
        testResult:
          description: The assessment result object for the test (for debugging)
        accuracy:
          type: number
          description: The accuracy of the student's attempted questions
        correctQuestions:
          type: number
          description: >-
            The number of correct questions the student has answered in the
            lesson
        totalQuestions:
          type: number
          description: The total number of questions in the lesson
        xp:
          type:
            - number
            - 'null'
          description: The XP the student has earned in the lesson
        multiplier:
          type:
            - number
            - 'null'
          description: The multiplier for the student's XP
      required:
        - lessonType
        - powerpathScore
        - responseResult
        - accuracy
        - correctQuestions
        - totalQuestions
        - xp
        - multiplier
      description: >-
        Represents the result of updating the student's response to the question
        in the PowerPath100 lesson (ComponentResource)
    QuizUpdateStudentQuestionResponseResult:
      type: object
      properties:
        questionResult:
          description: The assessment result object for the question (for debugging)
        lessonType:
          type: string
          const: quiz
      required:
        - lessonType
      description: >-
        Represents the result of updating the student's response to the question
        in the PowerPath Quiz lesson
    TestOutUpdateStudentQuestionResponseResult:
      type: object
      properties:
        questionResult:
          description: The assessment result object for the question (for debugging)
        lessonType:
          type: string
          const: test-out
      required:
        - lessonType
      description: >-
        Represents the result of updating the student's response to the question
        in the PowerPath Test Out lesson
    PlacementUpdateStudentQuestionResponseResult:
      type: object
      properties:
        questionResult:
          description: The assessment result object for the question (for debugging)
        lessonType:
          type: string
          const: placement
      required:
        - lessonType
      description: >-
        Represents the result of updating the student's response to the question
        in the PowerPath Placement test
    UnitTestUpdateStudentQuestionResponseResult:
      type: object
      properties:
        questionResult:
          description: The assessment result object for the question (for debugging)
        lessonType:
          type: string
          const: unit-test
      required:
        - lessonType
      description: >-
        Represents the result of updating the student's response to the question
        in the PowerPath Unit Test lesson
