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

# Post apiv1courses gradesmewhat if



## OpenAPI

````yaml /api/openapi.json post /api/v1/courses/{courseId}/grades/me/what-if
openapi: 3.1.0
info:
  title: Tessera API
  version: '1'
servers:
  - url: https://tessera.edstratumlabs.ai
    description: Production
security: []
paths:
  /api/v1/courses/{courseId}/grades/me/what-if:
    post:
      tags:
        - courses
      operationId: whatIfMyGrade
      parameters:
        - name: courseId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                scores:
                  maxItems: 200
                  type: array
                  items:
                    type: object
                    properties:
                      assignmentId:
                        type: string
                        minLength: 1
                      score:
                        type: number
                        minimum: 0
                    required:
                      - assignmentId
                      - score
                target:
                  anyOf:
                    - type: object
                      properties:
                        letter:
                          type: string
                          minLength: 1
                      required:
                        - letter
                    - type: object
                      properties:
                        percent:
                          type: number
                          minimum: 0
                      required:
                        - percent
                solveFor:
                  type: string
                  minLength: 1
              required:
                - scores
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  trace:
                    type: object
                    properties:
                      studentId:
                        type: string
                        minLength: 1
                      view:
                        type: string
                        enum:
                          - student
                          - held
                      mode:
                        type: string
                        enum:
                          - weighted
                          - points
                      rulesVersion:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      setupVersion:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      computedAt:
                        type: string
                        minLength: 1
                      engineVersion:
                        type: string
                      categories:
                        type: array
                        items: {}
                      steps:
                        type: array
                        items: {}
                      totals: {}
                      reasons:
                        type: array
                        items: {}
                    required:
                      - studentId
                      - view
                      - mode
                      - rulesVersion
                      - setupVersion
                      - computedAt
                      - engineVersion
                      - categories
                      - steps
                      - totals
                      - reasons
                    additionalProperties: false
                  delta:
                    type:
                      - number
                      - 'null'
                  changedReasons:
                    type: array
                    items:
                      type: string
                  needed:
                    anyOf:
                      - anyOf:
                          - type: object
                            properties:
                              assignmentId:
                                type: string
                                minLength: 1
                              score:
                                type: number
                                minimum: 0
                            required:
                              - assignmentId
                              - score
                            additionalProperties: false
                          - type: object
                            properties:
                              unreachable:
                                type: boolean
                                const: true
                            required:
                              - unreachable
                            additionalProperties: false
                      - type: 'null'
                required:
                  - trace
                  - delta
                  - changedReasons
                  - needed
                additionalProperties: false
        '400':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '401':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '403':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '404':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '409':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '429':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
      security:
        - bearerAuth: []
components:
  schemas:
    ApiErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthenticated
                - forbidden
                - not-found
                - invalid
                - conflict
                - not-ready
                - ai-disabled
                - ai-failed
                - rate-limited
                - too-large
                - unsupported
            message:
              type: string
            details: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Scoped tsk_… API token or Access JWT

````