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

# GET - Constants

>  The API provides a centralized repository of predefined constants for the evaluation platform. These constants ensure data consistency across APIs by standardizing values such as subjects, grades, file types, query statuses, and more. This API is primarily used to fetch reference data for UI dropdowns, data validation, and workflow configurations. 

**Scenario: Populating Dropdowns for Form Submission:**

1. **Dynamic Dropdown Population:**
   - A teacher uploads results for an exam. The UI dynamically fetches options like Subjects (e.g., "Science," "Math"), Grades (e.g., "First," "Second"), and Exam Types (e.g., "Pre Boards") from the Constants API.
   - **Outcome:**
     - The selected values are sent back in subsequent API calls, ensuring data consistency for form submissions.

**Scenario: Validating File Upload and Status Management:**

1. **Validating File Types and Status:**
   - A teacher uploads a file as part of the result evaluation process. The system uses predefined file types (e.g., "pdf," "jpeg") and file statuses (e.g., "Open," "In Progress," "Completed") from the Constants API.
   - **Outcome:**
     - This ensures only valid file formats are uploaded and tracks the status of the file throughout the workflow. 



## OpenAPI

````yaml GET /evaluation-platform/constants/
openapi: 3.0.1
info:
  title: Evaluation Report API
  description: An API for retrieving evaluation reports.
  version: 1.0.0
servers:
  - url: https://api-staging.crazygoldfish.com
    description: SandBox endpoint
  - url: https://api.crazygoldfish.com
    description: Prod End Point
security: []
paths:
  /evaluation-platform/constants/:
    get:
      summary: Get a list of available constants required in the evaluation.
      responses:
        '200':
          description: Successful response with metadata.
          content:
            application/json:
              schema:
                type: object
                properties:
                  subjects:
                    type: object
                    description: >-
                      Represents subject IDs mapped to subject names. Used for
                      categorizing exams and answer sheets. `Example: 1:
                      Science`
                    additionalProperties:
                      type: string
                    example:
                      '1': Science
                      '2': Math
                      '3': English
                      '4': Hindi
                  grade:
                    type: object
                    description: >-
                      Maps class IDs to their respective class names. Useful for
                      organizing exams by grade level. `Example: 10: Tenth`
                    additionalProperties:
                      type: string
                    example:
                      '1': First
                      '2': Second
                      '3': Third
                      '4': Fourth
                      '5': Fifth
                      '6': Sixth
                      '7': Seventh
                      '8': Eighth
                      '9': Ninth
                      '10': Tenth
                      '11': Eleventh
                      '12': Twelfth
                  examType:
                    type: object
                    description: >-
                      Maps exam type IDs to descriptions. `Example: 1: Pre
                      Boards`
                    additionalProperties:
                      type: string
                    example:
                      '1': Pre Boards
                  fileType:
                    type: object
                    description: >-
                      Represents the format of uploaded files. `Example: 1: pdf,
                      2: png, 3: jpeg`
                    additionalProperties:
                      type: string
                    example:
                      '1': pdf
                      '2': png
                      '3': jpeg
                  fileStatus:
                    type: object
                    description: >-
                      Indicates the status of a file being processed. `Example:
                      0: Open, 2: Completed`
                    additionalProperties:
                      type: string
                    example:
                      '0': Open
                      '1': In Progress
                      '2': Completed
                      '3': Failed
                  queryTypes:
                    type: object
                    description: >-
                      Maps query types to their descriptions. Useful for
                      managing user queries. `Example: 1: Classification`
                    additionalProperties:
                      type: string
                    example:
                      '1': Classification
                      '2': Re-evaluation Request
                      '3': Other Concerns
                  queryStatus:
                    type: object
                    description: >-
                      Indicates the progress of a query.. `Example: 1:
                      Submitted, 3: Resolved`
                    additionalProperties:
                      type: string
                    example:
                      '1': Submitted
                      '2': In Review
                      '3': Resolved
                  publishTypeEntity:
                    type: array
                    description: >-
                      Represents possible states for publishing results.
                      `Values: [pre-publish, final-publish]`
                    items:
                      type: string
                    example:
                      - pre-publish
                      - final-publish
                  updateEntityType:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                        fields:
                          type: array
                          items:
                            type: string
                    example:
                      - type: question
                        fields:
                          - text
                          - marks
                          - isApproved
                      - type: parentQuestion
                        fields:
                          - text
                          - marks
                          - isApproved
                      - type: modelAnswer
                        fields:
                          - text
                          - stepMarking
                          - isApproved
                      - type: answer
                        fields:
                          - text
                          - marks
                          - isApproved
                          - updateReason
        '403':
          description: Authentication failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Token has expired
              example:
                detail: Token has expired
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````